summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/smb2_tcon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index b0db5e66b7..4c0544fba2 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -273,6 +273,11 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
break;
}
+ if (lp_hideunreadable(SNUM(tcon->compat_conn)) ||
+ lp_hideunwriteable_files(SNUM(tcon->compat_conn))) {
+ *out_share_flags |= SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM;
+ }
+
*out_maximal_access = tcon->compat_conn->share_access;
*out_tree_id = tcon->tid;