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 | 0fcf167af898a9c7a20fddc0d95c887477a22ed1 (patch) | |
tree | df232952166391518001c71d32c04537e06a6f60 | |
parent | 3e5cada9885059e9926eb6a56d350c4b1b53d245 (diff) | |
download | samba-0fcf167af898a9c7a20fddc0d95c887477a22ed1.tar.gz samba-0fcf167af898a9c7a20fddc0d95c887477a22ed1.tar.xz samba-0fcf167af898a9c7a20fddc0d95c887477a22ed1.zip |
local.h: Added NTFS define if HAVE_NT_SMBS is defined.
nttrans.c: Fixed issue with access DELETE on renaming files.
Jeremy.
-rw-r--r-- | source/include/local.h | 5 | ||||
-rw-r--r-- | source/smbd/nttrans.c | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/source/include/local.h b/source/include/local.h index 144c2d2838b..f32700c0eb8 100644 --- a/source/include/local.h +++ b/source/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/source/smbd/nttrans.c b/source/smbd/nttrans.c index 541b4829260..45334e88e57 100644 --- a/source/smbd/nttrans.c +++ b/source/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. */ |