]> git.proxmox.com Git - proxmox-backup.git/commit
auth: add locking to `PbsAuthenticator` to avoid race conditions master
authorShannon Sterz <s.sterz@proxmox.com>
Thu, 23 May 2024 11:25:59 +0000 (13:25 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 3 Jun 2024 08:55:02 +0000 (10:55 +0200)
commit94d6a65dd6ccf6683175bdd92e6d8985703fba95
tree6d298a86b695fbc2fb5019b8803f1dcdcb995ca0
parent843211b050e038924b1ccfd9edad620b1fe0dbac
auth: add locking to `PbsAuthenticator` to avoid race conditions

currently we don't lock the shadow file when removing or storing a
password. by adding locking here we avoid a situation where storing
and/or removing a password concurrently could lead to a race
condition. in this scenario it is possible that a password isn't
persisted or a password isn't removed. we already do this for
the "token.shadow" file, so just use the same mechanism here.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
src/auth.rs