]> git.ipfire.org Git - thirdparty/samba.git/commit
smbd: use op->global->open_global_id for the share_mode_entry.share_file_id
authorRalph Boehme <slow@samba.org>
Thu, 9 Oct 2025 13:27:31 +0000 (15:27 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 10 Oct 2025 11:43:16 +0000 (11:43 +0000)
commit3df388b8f148c00a3ef331d393cea976fb9340b3
treee588f730966785d529dc6b81a7599736ce4598e3
parentff60b7538412a76253c51a830da3a204a574d4a0
smbd: use op->global->open_global_id for the share_mode_entry.share_file_id

open_global_id is an uint32_t, share_file_id is an uint64_t.

For internal opens that don't have an smbXsrv_open_global.tdb entry, continue to
use a generation counter starting at UINT32_MAX + 1.

We don't expose internal opens via srvsrc, which imposes the requirement for
using an uint32_t, so we can use larger ids for the internal opens as srvsvc
never sees them (as they're not in smbXsrv_open_global.tdb and srvsvc as any
other component listing open files like smbstatus lists smbXsrv_open_global.tdb).

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Oct 10 11:43:16 UTC 2025 on atb-devel-224
source3/locking/share_mode_lock.c
source3/smbd/durable.c
source3/smbd/files.c