From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B362A1FF15C for ; Wed, 27 Nov 2024 14:05:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BC393170CB; Wed, 27 Nov 2024 14:05:25 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Wed, 27 Nov 2024 14:05:21 +0100 Message-Id: <20241127130521.1019765-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [datastore.rs, store.name] Subject: [pbs-devel] [PATCH proxmox-backup] api: create_datastore: fix nesting checks 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" dGhlcmUgdHdvIGtpbmRzIG9mIG92ZXJsYXAgd2UgbmVlZCB0byBjaGVjayBoZXJlOgotIHR3byBy ZW1vdmFibGUgZGF0YXN0b3JlcyBiYWNrZWQgYnkgdGhlIHN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4gY29uZmlnLmNvbnZlcnRfdG9fdHlwZWRf YXJyYXk6OjxEYXRhU3RvcmVDb25maWc+KCJkYXRhc3RvcmUiKT8gewotICAgICAgICBpZiBzdG9y ZS5iYWNraW5nX2RldmljZSAhPSBkYXRhc3RvcmUuYmFja2luZ19kZXZpY2UgewotICAgICAgICAg ICAgY29udGludWU7CisgICAgICAgIC8vIFJlbGF0aXZlIHBhdGhzIG11c3Qgbm90IGJlIG5lc3Rl ZCBvbiB0aGUgYmFja2luZyBkZXZpY2Ugb2YgcmVtb3ZhYmxlIGRhdGFzdG9yZXMKKyAgICAgICAg aWYgcmVtb3ZhYmxlICYmIHN0b3JlLmJhY2tpbmdfZGV2aWNlID09IGRhdGFzdG9yZS5iYWNraW5n X2RldmljZSB7CisgICAgICAgICAgICBsZXQgbmV3X3BhdGggPSBQYXRoOjpuZXcoJmRhdGFzdG9y ZS5wYXRoKTsKKyAgICAgICAgICAgIGxldCBwYXRoID0gUGF0aDo6bmV3KCZzdG9yZS5wYXRoKTsK KyAgICAgICAgICAgIGlmIG5ld19wYXRoLnN0YXJ0c193aXRoKHBhdGgpIHx8IHBhdGguc3RhcnRz X3dpdGgobmV3X3BhdGgpIHsKKyAgICAgICAgICAgICAgICBwYXJhbV9iYWlsISgKKyAgICAgICAg ICAgICAgICAgICAgInBhdGgiLAorICAgICAgICAgICAgICAgICAgICAicGF0aHMgb24gYmFja2lu ZyBkZXZpY2UgbXVzdCBub3QgYmUgbmVzdGVkIC0ge3BhdGg6P30gYWxyZWFkeSB1c2VkIGJ5ICd7 c3RvcmV9JyEiLAorICAgICAgICAgICAgICAgICAgICBzdG9yZSA9IHN0b3JlLm5hbWUKKyAgICAg ICAgICAgICAgICApOworICAgICAgICAgICAgfQogICAgICAgICB9CiAKLSAgICAgICAgLy8gU2lu Y2Ugd2UgY2hlY2sgZm9yIHRoYXQgb24gY3JlYXRpb24sIHdlIGFzc3VtZSBhbGwgcmVtb3ZhYmxl IGRhdGFzdG9yZQotICAgICAgICAvLyBwYXRocyBhcmUgcmVsYXRpdmUsIHNvIGRvbid0IGhhdmUg YSBsZWFkaW5nIGAvYC4KLSAgICAgICAgbGV0IHN0b3JlX3BhdGggPSBQYXRoOjpuZXcoJnN0b3Jl LnBhdGgpOworICAgICAgICAvLyBObyB0d28gZGF0YXN0b3JlcyBzaG91bGQgaGF2ZSBhIG5lc3Rl ZCBhYnNvbHV0ZSBwYXRoCisgICAgICAgIGxldCBzdG9yZV9wYXRoID0gUGF0aEJ1Zjo6ZnJvbShz dG9yZS5hYnNvbHV0ZV9wYXRoKCkpOwogICAgICAgICBpZiBzdG9yZV9wYXRoLnN0YXJ0c193aXRo KCZuZXdfc3RvcmVfcGF0aCkgfHwgbmV3X3N0b3JlX3BhdGguc3RhcnRzX3dpdGgoJnN0b3JlX3Bh dGgpIHsKICAgICAgICAgICAgIHBhcmFtX2JhaWwhKAogICAgICAgICAgICAgICAgICJwYXRoIiwK LSAgICAgICAgICAgICAgICAibmVzdGVkIGRhdGFzdG9yZXMgbm90IGFsbG93ZWQ6ICd7fScgYWxy ZWFkeSBpbiAne30nIiwKKyAgICAgICAgICAgICAgICAibmVzdGVkIGRhdGFzdG9yZXMgbm90IGFs bG93ZWQ6ICd7fScgYWxyZWFkeSBpbiB7Oj99IiwKICAgICAgICAgICAgICAgICBzdG9yZS5uYW1l LAotICAgICAgICAgICAgICAgIHN0b3JlLnBhdGgKKyAgICAgICAgICAgICAgICBzdG9yZV9wYXRo LAogICAgICAgICAgICAgKTsKICAgICAgICAgfQogICAgIH0KLS0gCjIuMzkuNQoKCgpfX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpwYnMtZGV2ZWwgbWFpbGlu ZyBsaXN0CnBicy1kZXZlbEBsaXN0cy5wcm94bW94LmNvbQpodHRwczovL2xpc3RzLnByb3htb3gu Y29tL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9wYnMtZGV2ZWwK