smbd: add flag "is_dirfsp" to the fsp_flags
authorRalph Boehme <slow@samba.org>
Mon, 6 Apr 2020 13:41:41 +0000 (15:41 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 21 May 2020 05:23:30 +0000 (05:23 +0000)
This denotes pure VFS layer dirfsps that are used in *AT varients of VFS
interface functions and which bypass the FSA layer, requiring special handling
in codepaths closing/freeing the fsp.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/vfs.h
source3/smbd/files.c

index caec8e8088e3616b9139792ff38589a70cb210d7..d636519babfd22091790fc5eb4f0a4c51a2ccbcf 100644 (file)
@@ -396,6 +396,7 @@ typedef struct files_struct {
                bool can_write : 1;
                bool modified : 1;
                bool is_directory : 1;
+               bool is_dirfsp : 1;
                bool aio_write_behind : 1;
                bool initial_delete_on_close : 1;
                bool delete_on_close : 1;
index a1aa7e1183ecbb24dc1e2cacee85c001cef68089..e460cfdc02780956f305eb0b5d614e2add585228 100644 (file)
@@ -196,6 +196,7 @@ NTSTATUS create_internal_dirfsp(connection_struct *conn,
 
        fsp->access_mask = FILE_LIST_DIRECTORY;
        fsp->fsp_flags.is_directory = true;
+       fsp->fsp_flags.is_dirfsp = true;
 
        *_fsp = fsp;
        return NT_STATUS_OK;