First part of #9374 - Allow smb2.acls torture test to pass against smbd with a POSIX...
authorJeremy Allison <jra@samba.org>
Tue, 13 Nov 2012 00:17:19 +0000 (16:17 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 3 Dec 2012 19:22:41 +0000 (20:22 +0100)
Use the requested access mask before making the fd_open request in
open_directory() rather than faking up an access mask of
FILE_READ_DATA | FILE_READ_ATTRIBUTES.

The underlying ACL may not permit FILE_READ_DATA.

source3/smbd/open.c

index 6b94a6d24739103eff97428a1fd3d778216e0c65..10c2180194a5f4e2b922d04adb96fbc6bb444cec 100644 (file)
@@ -2752,8 +2752,8 @@ static NTSTATUS open_directory(connection_struct *conn,
 
        mtimespec = smb_dname->st.st_ex_mtime;
 
-       /* Temporary access mask used to open the directory fd. */
-       fsp->access_mask = FILE_READ_DATA | FILE_READ_ATTRIBUTES;
+       fsp->access_mask = access_mask;
+
 #ifdef O_DIRECTORY
        status = fd_open(conn, fsp, O_RDONLY|O_DIRECTORY, 0);
 #else