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 9AC5A1FF148 for ; Mon, 27 Apr 2026 10:50:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 79BE31588D; Mon, 27 Apr 2026 10:50:32 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 2/3] pull: do not allow archive fetching to return no archive Date: Mon, 27 Apr 2026 10:49:48 +0200 Message-ID: <20260427084952.303245-3-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260427084952.303245-1-f.gruenbichler@proxmox.com> References: <20260427084952.303245-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777279701267 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.054 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 Message-ID-Hash: CF6CFY7FD2I7C5SJEZNUCEITOSTV7ZJD X-Message-ID-Hash: CF6CFY7FD2I7C5SJEZNUCEITOSTV7ZJD X-MailFrom: f.gruenbichler@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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: allowing Ok(None) here only makes sense for manifests (where we can treat this as a disappeared snapshot). Signed-off-by: Fabian Grünbichler --- src/server/pull.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/pull.rs b/src/server/pull.rs index 020dbf508..d7455c2ee 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -447,10 +447,14 @@ async fn pull_single_archive<'a>( .log(Level::INFO, format!("{archive_prefix}: sync archive")) .await?; - reader + if reader .load_file_into(archive_name, &tmp_path) .await - .with_context(|| archive_prefix.clone())?; + .with_context(|| archive_prefix.clone())? + .is_none() + { + bail!("Failed to load archive {archive_name}"); + }; let mut tmpfile = std::fs::OpenOptions::new() .read(true) -- 2.47.3