From f5a4d08d9ed37e08b709c3ee4b0f3db2b2249855 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Jun 2000 21:54:50 +0000 Subject: Fix for map_share_mode to allow desired access of zero map to stat open. Jeremy. (This used to be commit b0242080fe464e71815431559fe54d109e0b92f2) --- source3/smbd/nttrans.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; -- cgit