mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
(Correct) fix for desired_access being zero in map_share_mode().
Jeremy.
This commit is contained in:
parent
0d59e8c6bf
commit
cc447fbe3c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user