From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id CE8A01FF09C for ; Mon, 19 Oct 2026 13:01:18 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E40F3216A6; Mon, 19 Oct 2026 13:00:39 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH storage 2/4] fix #8169: pvesm: extractconfig: fix regression with backup type check Date: Mon, 19 Oct 2026 12:57:53 +0200 Message-ID: <20261019110029.92256-3-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: 1792407633919 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.387 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: UAAHNRXMWF7AT5D2XJM2YD7W3PQ3MK2V X-Message-ID-Hash: UAAHNRXMWF7AT5D2XJM2YD7W3PQ3MK2V 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 9d0049e ("pvesm: 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: 9d0049e ("pvesm: extractconfig: clean early error for non-guest backup") Signed-off-by: Fiona Ebner --- src/PVE/CLI/pvesm.pm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/PVE/CLI/pvesm.pm b/src/PVE/CLI/pvesm.pm index 4b42734..fa32295 100755 --- a/src/PVE/CLI/pvesm.pm +++ b/src/PVE/CLI/pvesm.pm @@ -182,13 +182,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"; - } - } - my $config_raw = PVE::Storage::extract_vzdump_config($storage_cfg, $volume); print "$config_raw\n"; -- 2.47.3