]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: let directory entries inherit the smb_fname->flags from the directory
authorRalph Boehme <slow@samba.org>
Thu, 15 Oct 2020 17:45:21 +0000 (19:45 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 23 Oct 2020 07:56:33 +0000 (07:56 +0000)
If the listed directory has SMB_FILENAME_POSIX_PATH set, this change causes the
smb_fname of directory entries to inherit the flag so subsequent operations on
the directory entry can correctly implement POSIX semantics.

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

index 0001726e582660108cfd6f395877d1d59fc5e6bc..6b5b4715d5460d74e537bd602ca75a3ce8826119 100644 (file)
@@ -872,6 +872,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                        .base_name = pathreal,
                        .st = sbuf,
                        .twrp = dirptr->smb_dname->twrp,
+                       .flags = dirptr->smb_dname->flags,
                };
 
                ok = mode_fn(ctx, private_data, &smb_fname, get_dosmode, &mode);