]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/locking: map between fsp->op->global->persistent and SHARE_ENTRY_FLAG_PERSISTENT_OPEN
authorRalph Boehme <slow@samba.org>
Tue, 7 Oct 2025 16:41:26 +0000 (18:41 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:36 +0000 (10:18 +0000)
This marks a share_mode_entry as a Persistent Handle.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/locking/share_mode_lock.c

index 83a961ba01d42065e8852fdba164d9dabe86fab4..5e54198def60b8f202b4eb98bbc1df1970569ee3 100644 (file)
@@ -3558,6 +3558,9 @@ uint16_t fsp_get_share_entry_flags(const struct files_struct *fsp)
        if (fsp->fsp_flags.ntcreatex_deny_fcb) {
                flags |= SHARE_ENTRY_FLAG_DENY_FCB;
        }
+       if (fsp->op != NULL && fsp->op->global->persistent) {
+               flags |= SHARE_ENTRY_FLAG_PERSISTENT_OPEN;
+       }
        return flags;
 }