Fix for map_share_mode to allow desired access of zero map to stat open.
authorJeremy Allison <jra@samba.org>
Thu, 8 Jun 2000 21:54:50 +0000 (21:54 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 8 Jun 2000 21:54:50 +0000 (21:54 +0000)
Jeremy.

source/smbd/nttrans.c

index aad09a75b68015b3551760051e4d36f8153e6088..951851b5f998618bf1577f45653643d428e77ae2 100644 (file)
@@ -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;