diff options
author | Jeremy Allison <jra@samba.org> | 2000-06-08 21:54:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-06-08 21:54:50 +0000 |
commit | f5a4d08d9ed37e08b709c3ee4b0f3db2b2249855 (patch) | |
tree | a9df546057165dd642ea16b07ecb99110fa34eb6 /source3/smbd | |
parent | 28555ec92e061aafb31a9b071caf00e44132c70f (diff) | |
download | samba-f5a4d08d9ed37e08b709c3ee4b0f3db2b2249855.tar.gz samba-f5a4d08d9ed37e08b709c3ee4b0f3db2b2249855.tar.bz2 samba-f5a4d08d9ed37e08b709c3ee4b0f3db2b2249855.zip |
Fix for map_share_mode to allow desired access of zero map to stat open.
Jeremy.
(This used to be commit b0242080fe464e71815431559fe54d109e0b92f2)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index aad09a75b6..951851b5f9 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -433,6 +433,17 @@ 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; |