diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/nttrans.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 951851b5f9..8b3eabff80 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -434,25 +434,25 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, if (smb_open_mode == -1) { - /* - * JRA - NT seems to sometimes send desired_access as zero. play it safe - * and map to a stat open. - */ - - if(desired_access == 0) { - *pstat_open_only = True; - smb_open_mode = DOS_OPEN_RDONLY; - } - if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS) *pstat_open_only = True; if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| FILE_EXECUTE|FILE_READ_ATTRIBUTES| FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS| - FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) + FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) { smb_open_mode = DOS_OPEN_RDONLY; - else { + } else if(desired_access == 0) { + + /* + * JRA - NT seems to sometimes send desired_access as zero. play it safe + * and map to a stat open. + */ + + *pstat_open_only = True; + smb_open_mode = DOS_OPEN_RDONLY; + + } else { DEBUG(0,("map_share_mode: Incorrect value %lx for desired_access to file %s\n", (unsigned long)desired_access, fname)); return -1; |