flock possibly missing in SMB3 POSIX extensions?

Jeremy Allison jra at samba.org
Thu Mar 11 17:12:26 UTC 2021


On Thu, Mar 11, 2021 at 05:58:30PM +0100, Aurélien Aptel via samba-technical wrote:
>
>Little update on that topic: I was looking into the cifs.ko SMB1 flock
>code and it turns out advisory locks were already in the SMB1 Unix
>extensions.
>
>After a quick grep in samba I found smb_set_posix_lock() in
>s3/smbd/trans2.c so presumably some of the logic in the server is
>already there.

Yep, the SMB1 extensions already do POSIX advisory locks.

Once the VFS is finished (soon, I know, I know :-) +
SMB3+ POSIX extensions, handles opened with a POSIX
create context will do SMB3 locks as POSIX advisory
locks so the same logic can be used.



More information about the samba-technical mailing list