diff options
-rw-r--r-- | source3/include/local.h | 5 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/source3/include/local.h b/source3/include/local.h index 144c2d2838..f32700c0eb 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -83,8 +83,11 @@ /* what type of filesystem do we want this to show up as in a NT file manager window? */ +#ifdef HAVE_NT_SMBS +#define FSTYPE_STRING "NTFS" +#else /* HAVE_NT_SMBS */ #define FSTYPE_STRING "Samba" - +#endif /* HAVE_NT_SMBS */ /* the default guest account - normally set in the Makefile or smb.conf */ #ifndef GUEST_ACCOUNT diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 541b482926..45334e88e5 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -308,7 +308,7 @@ static int map_create_disposition( uint32 create_disposition) static int map_share_mode( uint32 desired_access, uint32 share_access, uint32 file_attributes) { - int smb_open_mode; + int smb_open_mode = -1; switch( desired_access & (FILE_READ_DATA|FILE_WRITE_DATA) ) { case FILE_READ_DATA: @@ -320,10 +320,16 @@ static int map_share_mode( uint32 desired_access, uint32 share_access, uint32 fi case FILE_READ_DATA|FILE_WRITE_DATA: smb_open_mode = 2; break; - default: - DEBUG(0,("map_share_mode: Incorrect value for desired_access = %x\n", + } + + if (smb_open_mode == -1) { + if(desired_access & DELETE_ACCESS) + smb_open_mode = 2; + else { + DEBUG(0,("map_share_mode: Incorrect value for desired_access = %x\n", desired_access)); - return -1; + return -1; + } } /* Add in the requested share mode - ignore FILE_SHARE_DELETE for now. */ |