From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 78CB71FF09C for ; Mon, 19 Oct 2026 13:00:42 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 65671215ED; Mon, 19 Oct 2026 13:00:38 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH manager 4/4] fix #8169: api: backup: extract config: fix regression with backup type check Date: Mon, 19 Oct 2026 12:57:55 +0200 Message-ID: <20261019110029.92256-5-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261019110029.92256-1-f.ebner@proxmox.com> References: <20261019110029.92256-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792407634032 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.389 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QM5D7ZP3PIMUI56TOIEXYX2BS4JLOW3J X-Message-ID-Hash: QM5D7ZP3PIMUI56TOIEXYX2BS4JLOW3J X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Commit c7d53321 ("backup: extractconfig: clean early error for non-guest backup") introduced a regression for guest backups without a guest ID: it is no longer possible to extract the configuration from such backups. Before, there was a Perl warning about the uninitialized ID and the permission check would need to pass for 'VM.Backup' on '/vms', but extraction was possible and it was relied on in practice, see the regression report. Avoid the early check for a guest ID, which does not cover (e.g. manually renamed) guest backups without a guest ID. The storage layer already checks the backup type later. In particular, the extract_vzdump_config() function has three branches: 1. PBS: the PBS plugin's extract_vzdump_config() checks that the backup's format is either 'pbs-vm' or 'pbs-ct'. 2. backup provider: only guest backups are part of the backup provider API. It is the implemenation's responsibility to avoid exposing other content, in particular via archive_get_guest_config() here. 3. path-based vzdump backup: the backup type is checked via archive_info() to be one of 'lxc', 'openvz' or 'qemu'. Fixes: c7d53321 ("backup: extractconfig: clean early error for non-guest backup") Signed-off-by: Fiona Ebner --- PVE/API2/VZDump.pm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 98caf1d9..62ca153c 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -303,13 +303,6 @@ __PACKAGE__->register_method({ $rpcenv, $authuser, $storage_cfg, undef, $volume, 'backup', ); - if (PVE::Storage::parse_volume_id($volume, 1)) { - my (undef, undef, $ownervm) = PVE::Storage::parse_volname($storage_cfg, $volume); - if (!defined($ownervm)) { - die "unable to extract configuration for '$volume' - not a guest backup\n"; - } - } - return PVE::Storage::extract_vzdump_config($storage_cfg, $volume); }, }); -- 2.47.3