[pbs-devel] [PATCH proxmox-backup] auth: add locking to `PbsAuthenticator` to avoid race conditions
Shannon Sterz
s.sterz at proxmox.com
Thu May 23 14:06:01 CEST 2024
On Thu May 23, 2024 at 1:46 PM CEST, Gabriel Goller wrote:
> 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?
do you mean the `authenticate_user` function? this patch add a locking
call to the `store_password` function for me.
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
More information about the pbs-devel
mailing list