summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-02-25 12:53:45 -0800
committerJeremy Allison <jra@samba.org>2009-02-25 12:53:45 -0800
commit3d7cde5dd3603ba3a7e78e8ca9a28d5bbf816b80 (patch)
tree66272efd2adb62e16860bb05a5e67d4526a433fa /source3/smbd
parentd86cb9b52d8cdaa03f856665f56278836e6336d3 (diff)
downloadsamba-3d7cde5dd3603ba3a7e78e8ca9a28d5bbf816b80.tar.gz
samba-3d7cde5dd3603ba3a7e78e8ca9a28d5bbf816b80.tar.bz2
samba-3d7cde5dd3603ba3a7e78e8ca9a28d5bbf816b80.zip
Fix bug in processing of open modes in POSIX open.
Was missing case of "If file exists open. If file doesn't exist error." Damn damn damn. CIFSFS client will have to have fallback cases for this error for a long time. Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 433b8a008d..369830b086 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6423,6 +6423,8 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
create_disp = FILE_OVERWRITE_IF;
} else if((wire_open_mode & SMB_O_CREAT) == SMB_O_CREAT) {
create_disp = FILE_OPEN_IF;
+ } else if (wire_open_mode == 0) {
+ create_disp = FILE_OPEN;
} else {
DEBUG(5,("smb_posix_open: invalid create mode 0x%x\n",
(unsigned int)wire_open_mode ));