summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-06-09 19:41:48 +0000
committerJeremy Allison <jra@samba.org>2000-06-09 19:41:48 +0000
commit891bdd0d3e38f6046a0207129a5dfbd67d2e0269 (patch)
tree5175d49df5150e047e28520d645b202b1d934719 /source3
parenteab8f3c9405d108e4bc05f02a4a595bbb13ba403 (diff)
downloadsamba-891bdd0d3e38f6046a0207129a5dfbd67d2e0269.tar.gz
samba-891bdd0d3e38f6046a0207129a5dfbd67d2e0269.tar.bz2
samba-891bdd0d3e38f6046a0207129a5dfbd67d2e0269.zip
(Correct) fix for desired_access being zero in map_share_mode().
Jeremy. (This used to be commit cc447fbe3cd77d57e18c3d1dff94a95d6032c311)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 951851b5f9..8b3eabff80 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -434,25 +434,25 @@ 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;
if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|
FILE_EXECUTE|FILE_READ_ATTRIBUTES|
FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS|
- FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS))
+ FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) {
smb_open_mode = DOS_OPEN_RDONLY;
- else {
+ } else if(desired_access == 0) {
+
+ /*
+ * JRA - NT seems to sometimes send desired_access as zero. play it safe
+ * and map to a stat open.
+ */
+
+ *pstat_open_only = True;
+ smb_open_mode = DOS_OPEN_RDONLY;
+
+ } else {
DEBUG(0,("map_share_mode: Incorrect value %lx for desired_access to file %s\n",
(unsigned long)desired_access, fname));
return -1;