diff options
author | Jeremy Allison <jra@samba.org> | 1998-07-17 00:47:16 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-07-17 00:47:16 +0000 |
commit | b61b50ac2c42968a499d1c048fa5ee89e321f8a0 (patch) | |
tree | 419b4e06d0e49e856921d4f7375a050c89d43674 /source3 | |
parent | dc44d77c7fd3427b1313e8ee2d7929fb7778148f (diff) | |
download | samba-b61b50ac2c42968a499d1c048fa5ee89e321f8a0.tar.gz samba-b61b50ac2c42968a499d1c048fa5ee89e321f8a0.tar.bz2 samba-b61b50ac2c42968a499d1c048fa5ee89e321f8a0.zip |
local.h: Added NTFS define if HAVE_NT_SMBS is defined.
nttrans.c: Fixed issue with access DELETE on renaming files.
Jeremy.
(This used to be commit 0fcf167af898a9c7a20fddc0d95c887477a22ed1)
Diffstat (limited to 'source3')
-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. */ |