summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-11-24 14:42:21 +0100
committerChristian Ambach <ambi@samba.org>2011-11-24 17:26:02 +0100
commit717a27ba2227764ba14c205eca276ed67e752a59 (patch)
tree5abff38dfd3cd35ae5999b7a886bc22c4fa551a2
parentfaf8b9bba053e844d530021566c75d83c031a94d (diff)
downloadsamba-717a27ba2227764ba14c205eca276ed67e752a59.tar.gz
samba-717a27ba2227764ba14c205eca276ed67e752a59.tar.bz2
samba-717a27ba2227764ba14c205eca276ed67e752a59.zip
s3:smb2 report access_based_dir_enum in tcon reply
let the client know when hide unreadable or hide unwriteable files is set for a share
-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;