From: Christian Ebner <c.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup] pbs-config: refactor and move helper to detect config digest changes
Date: Tue, 7 Apr 2026 09:52:06 +0200 [thread overview]
Message-ID: <b2cf5456-21f1-4ad5-952e-926d9365929b@proxmox.com> (raw)
In-Reply-To: <8b96cc02-af6d-4053-9d4b-acaffed953bc@proxmox.com>
On 4/5/26 10:37 AM, Thomas Lamprecht wrote:
> On 02/04/2026 15:40, Christian Ebner wrote:
[..]
>> - }
>> + pbs_config::detect_modified_configuration_file(
>> + digest,
>> + &crate::config::tfa::webauthn_config_digest(wa)?,
>
> The webauthn parsing was previously only done if there was an expected
> digest send along, now it's done unconditionally. It probably isn't a problem,
> it should be valid and thus parseable anyway, and this is the only place
> where we did not already parse upfront anyway.
>
> But that made we wonder if we could encapsulate that along side the config
> parsing directly, i.e., pass the config parse method the digest param as option
> (or add a new fn like config_if_not_modified where it's not an option).
> But probably not that much additional to gain with that, just wanted to put the
> idea out there.
Okay, can have a go at this once done with the encrypted push sync
patches, thanks for the pointer.
>
>> + )?;
>>
>> if let Some(delete) = delete {
>> for delete in delete {
>
>> diff --git a/src/tools/mod.rs b/src/tools/mod.rs
>> index 6a975bde2..51d9ad777 100644
>> --- a/src/tools/mod.rs
>> +++ b/src/tools/mod.rs
>> @@ -29,19 +29,6 @@ pub fn assert_if_modified(digest1: &str, digest2: &str) -> Result<(), Error> {
>
> assert_if_modified has only one user left in src/api2/node/dns.rs, might be
> worth to remove too now?
Yes, sent a patch for this:
https://lore.proxmox.com/pbs-devel/20260407075003.161713-1-c.ebner@proxmox.com/T/
>
>> Ok(())
>> }
>>
>> -/// Detect modified configuration files
>> -///
>> -/// This function fails with a reasonable error message if checksums do not match.
>> -pub fn detect_modified_configuration_file(
>> - digest1: &[u8; 32],
>> - digest2: &[u8; 32],
>> -) -> Result<(), Error> {
>> - if digest1 != digest2 {
>> - bail!("detected modified configuration - file changed by other user? Try again.");
>> - }
>> - Ok(())
>> -}
>> -
>> /// The default 2 hours are far too long for PBS
>> pub const PROXMOX_BACKUP_TCP_KEEPALIVE_TIME: u32 = 120;
>> pub const DEFAULT_USER_AGENT_STRING: &str = "proxmox-backup-client/1.0";
next prev parent reply other threads:[~2026-04-07 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 13:41 Christian Ebner
2026-04-05 8:39 ` Thomas Lamprecht
2026-04-07 7:52 ` Christian Ebner [this message]
2026-04-05 8:39 ` applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2cf5456-21f1-4ad5-952e-926d9365929b@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.