[pbs-devel] [PATCH proxmox-backup] auth: add locking to `PbsAuthenticator` to avoid race conditions

Gabriel Goller g.goller at proxmox.com
Thu May 23 13:46:47 CEST 2024


On 23.05.2024 13:25, Shannon Sterz wrote:
>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 at proxmox.com>

Is there any reason why the store_password function does not lock the
shadow.json file?




More information about the pbs-devel mailing list