From 51b827e9ed787989eb595f19787420419f3b368e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Feb 2009 12:54:58 -0800 Subject: [PATCH] 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. (cherry picked from commit b652082648c49b525d2b2ce619b575ee75bc242e) (cherry picked from commit 12cf12f10c1c6adad568daf6c16144a99b0f822e) (cherry picked from commit 2050a239a5fee6cfd17d083619cc4a03a3a6dd6d) --- source/smbd/trans2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 31fd18d6e3d..5b182df8208 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -6362,6 +6362,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 )); -- 2.11.4.GIT