]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In smbd_dirptr_get_entry() add a call to is_visible_fsp().
authorJeremy Allison <jra@samba.org>
Fri, 4 Jun 2021 17:10:55 +0000 (10:10 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dir.c

index 9ce4ba19ee9d64b78904c61eaff137265dd88f31..287e7cbba102679766ab4f4bbf0f010cd7b702d0 100644 (file)
@@ -982,6 +982,13 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                        continue;
                }
 
+               if (!is_visible_fsp(smb_fname->fsp, false)) {
+                       TALLOC_FREE(smb_fname);
+                       TALLOC_FREE(dname);
+                       TALLOC_FREE(fname);
+                       continue;
+               }
+
                ok = mode_fn(ctx, private_data, smb_fname, get_dosmode, &mode);
                if (!ok) {
                        TALLOC_FREE(smb_fname);