From f92fad101a755cdf0845dd8abf9431312ba82094 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Feb 2011 16:04:09 -0800 Subject: Ensure we don't return an incorrect access mask. From the Microsoft test suite @ Connectathon: Test Case: TestSuite_ScenarioNo009GrantedAccessTestS0 File created with access = 0x7 (Read, Write, Delete) Query Info on file returns 0x87 (Read, Write, Delete, Read Attributes) Jeremy. --- source3/smbd/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d66f9bae17..7735301c22 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2261,8 +2261,9 @@ 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 | FILE_READ_ATTRIBUTES; + fsp->access_mask = access_mask; if (file_existed) { /* stat opens on existing files don't get oplocks. */ -- cgit