diff options
author | Jeremy Allison <jra@samba.org> | 2009-02-25 13:00:44 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-02-25 13:00:44 -0800 |
commit | bfc7ec9e4a35e8ad64205e56cd0e621b41740efb (patch) | |
tree | d6fb9ffe7482406ddd7411a08cc92afe0103b15b /source3/smbd | |
parent | 3d7cde5dd3603ba3a7e78e8ca9a28d5bbf816b80 (diff) | |
download | samba-bfc7ec9e4a35e8ad64205e56cd0e621b41740efb.tar.gz samba-bfc7ec9e4a35e8ad64205e56cd0e621b41740efb.tar.bz2 samba-bfc7ec9e4a35e8ad64205e56cd0e621b41740efb.zip |
Make test for open modes more robust against other bits.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 369830b086..ee1dda98b2 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6423,7 +6423,7 @@ 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) { + } else if ((wire_open_mode & (SMB_O_CREAT | SMB_O_EXCL | SMB_O_TRUNC)) == 0) { create_disp = FILE_OPEN; } else { DEBUG(5,("smb_posix_open: invalid create mode 0x%x\n", |