diff options
author | Jeremy Allison <jra@samba.org> | 2011-04-08 16:18:56 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-04-08 16:18:56 -0700 |
commit | c6c17242d23cd03acd5adc29969177881a7d04e1 (patch) | |
tree | 498a9e5fdac8f6aee673728cabae36355fbf1af5 /source3 | |
parent | 58a0c8a9e0daa5e4071b756fb8f410a398ae8b99 (diff) | |
download | samba-c6c17242d23cd03acd5adc29969177881a7d04e1.tar.gz samba-c6c17242d23cd03acd5adc29969177881a7d04e1.tar.bz2 samba-c6c17242d23cd03acd5adc29969177881a7d04e1.zip |
Subtle change. Microsoft SMB2 tests return different access mask than for SMB1 with raw.acls.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/open.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index c03200e511..5c449fcb86 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2266,7 +2266,18 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * According to Samba4, SEC_FILE_READ_ATTRIBUTE is always granted, * but we don't have to store this - just ignore it on access check. */ - fsp->access_mask = access_mask; + if (conn->sconn->using_smb2) { + /* + * SMB2 doesn't return it (according to Microsoft tests). + * Test Case: TestSuite_ScenarioNo009GrantedAccessTestS0 + * File created with access = 0x7 (Read, Write, Delete) + * Query Info on file returns 0x87 (Read, Write, Delete, Read Attributes) + */ + fsp->access_mask = access_mask; + } else { + /* But SMB1 does. */ + fsp->access_mask = access_mask | FILE_READ_ATTRIBUTES; + } if (file_existed) { /* stat opens on existing files don't get oplocks. */ |