From 12cf12f10c1c6adad568daf6c16144a99b0f822e 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) --- source/smbd/trans2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index fdca880144d..2fb0922511e 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -6382,6 +6382,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