From a66b7de76aa11cd16acc83042cb149b495bb5d75 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Jun 2021 10:10:55 -0700 Subject: [PATCH] s3: smbd: In smbd_dirptr_get_entry() add a call to is_visible_fsp(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/dir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 9ce4ba19ee9..287e7cbba10 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -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); -- 2.47.3