From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 415711FF163 for ; Thu, 21 Nov 2024 14:35:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EC3841E5CD; Thu, 21 Nov 2024 14:35:46 +0100 (CET) From: Gabriel Goller To: pbs-devel@lists.proxmox.com Date: Thu, 21 Nov 2024 14:35:06 +0100 Message-Id: <20241121133509.289419-2-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241121133509.289419-1-g.goller@proxmox.com> References: <20241121133509.289419-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.039 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup v4 1/4] snapshot: add helper function to retrieve verify_state X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" QWRkIGhlbHBlciBmdW5jdGlvbnMgdG8gcmV0cmlldmUgdGhlIHZlcmlmeV9zdGF0ZSBmcm9tIHRo ZSBtYW5pZmVzdCBvZiBhCnNuYXBzaG90LiBSZXBsYWNlZCBhbGwgdGhlIG1hbnVhbCAidmVyaWZ5 X3N0YXRlIiBwYXJzaW5nIHdpdGggdGhlI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GlvbjxTbmFwc2hvdFZlcmlmeVN0YXRlPiA9Ci0gICAgICAgICAgICAgICAg ICAgIG1hdGNoIHNlcmRlX2pzb246OmZyb21fdmFsdWUodmVyaWZpY2F0aW9uKSB7Ci0gICAgICAg ICAgICAgICAgICAgICAgICBPayh2ZXJpZnkpID0+IHZlcmlmeSwKLSAgICAgICAgICAgICAgICAg ICAgICAgIEVycihlcnIpID0+IHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcHJpbnRs biEoImVycm9yIHBhcnNpbmcgdmVyaWZpY2F0aW9uIHN0YXRlIDogJ3t9JyIsIGVycik7Ci0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgTm9uZQotICAgICAgICAgICAgICAgICAgICAgICAgfQot ICAgICAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAgIGxldCB2ZXJpZmljYXRpb246 IE9wdGlvbjxTbmFwc2hvdFZlcmlmeVN0YXRlPiA9IG1hdGNoIG1hbmlmZXN0LnZlcmlmeV9zdGF0 ZSgpIHsKKyAgICAgICAgICAgICAgICAgICAgT2sodmVyaWZ5KSA9PiB2ZXJpZnksCisgICAgICAg ICAgICAgICAgICAgIEVycihlcnIpID0+IHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVwcmlu dGxuISgiZXJyb3IgcGFyc2luZyB2ZXJpZmljYXRpb24gc3RhdGUgOiAne30nIiwgZXJyKTsKKyAg ICAgICAgICAgICAgICAgICAgICAgIE5vbmUKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgIH07CiAKICAgICAgICAgICAgICAgICBsZXQgc2l6ZSA9IFNvbWUoZmlsZXMuaXRl cigpLm1hcCh8eHwgeC5zaXplLnVud3JhcF9vcigwKSkuc3VtKCkpOwogCmRpZmYgLS1naXQgYS9z cmMvYXBpMi9iYWNrdXAvbW9kLnJzIGIvc3JjL2FwaTIvYmFja3VwL21vZC5ycwppbmRleCBlYTBk MDI5MmVjNTguLjYwNWM3NWUyZGZhOS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LDEzICsxNTksMTIgQEAgZm4gdXBncmFkZV90b19iYWNrdXBfcHJv dG9jb2woCiAgICAgICAgICAgICBsZXQgaW5mbyA9IGJhY2t1cF9ncm91cC5sYXN0X2JhY2t1cCh0 cnVlKS51bndyYXBfb3IoTm9uZSk7CiAgICAgICAgICAgICBpZiBsZXQgU29tZShpbmZvKSA9IGlu Zm8gewogICAgICAgICAgICAgICAgIGxldCAobWFuaWZlc3QsIF8pID0gaW5mby5iYWNrdXBfZGly LmxvYWRfbWFuaWZlc3QoKT87Ci0gICAgICAgICAgICAgICAgbGV0IHZlcmlmeSA9IG1hbmlmZXN0 LnVucHJvdGVjdGVkWyJ2ZXJpZnlfc3RhdGUiXS5jbG9uZSgpOwotICAgICAgICAgICAgICAgIG1h dGNoIHNlcmRlX2pzb246OmZyb21fdmFsdWU6OjxTbmFwc2hvdFZlcmlmeVN0YXRlPih2ZXJpZnkp IHsKLSAgICAgICAgICAgICAgICAgICAgT2sodmVyaWZ5KSA9PiBtYXRjaCB2ZXJpZnkuc3RhdGUg eworICAgICAgICAgICAgICAgIG1hdGNoIG1hbmlmZXN0LnZlcmlmeV9zdGF0ZSgpIHsKKyAgICAg ICAgICAgICAgICAgICAgT2soU29tZSh2ZXJpZnkpKSA9PiBtYXRjaCB2ZXJpZnkuc3RhdGUgewog ICAgICAgICAgICAgICAgICAgICAgICAgVmVyaWZ5U3RhdGU6Ok9rID0+IFNvbWUoaW5mbyksCiAg ICAgICAgICAgICAgICAgICAgICAgICBWZXJpZnlTdGF0ZTo6RmFpbGVkID0+IE5vbmUsCiAgICAg ICAgICAgICAgICAgICAgIH0sCi0gICAgICAgICAgICAgICAgICAgIEVycihfKSA9PiB7CisgICAg ICAgICAgICAgICAgICAgIE9rKE5vbmUpIHwgRXJyKF8pID0+IHsKICAgICAgICAgICAgICAgICAg ICAgICAgIC8vIG5vIHZlcmlmeSBzdGF0ZSBmb3VuZCwgdHJlYXQgYXMgdmFsaWQKICAgICAgICAg ICAgICAgICAg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