[SCM] Samba Shared Repository - branch v3-6-test updated

Karolin Seeger kseeger at samba.org
Wed Feb 13 11:35:52 MST 2013


The branch, v3-6-test has been updated
       via  d21280f Fix bug 9519 - Samba returns unexpected error on SMB posix open.
      from  872a7d6 s3: Make SMB2_GETINFO multi-volume aware.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit d21280f983249038bf7efda4edc1b1eadaff546a
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Feb 12 10:48:09 2013 -0800

    Fix bug 9519 - Samba returns unexpected error on SMB posix open.
    
    Explicitly ignore bare O_EXCL flags instead of returning INVALID_PARAMETER.
    That's what the Linux kernel does.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/trans2.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index f9e8809..df4fa64 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -7337,12 +7337,19 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
 			/* File exists open. File not exist create. */
 			create_disp = FILE_OPEN_IF;
 			break;
+		case SMB_O_EXCL:
+			/* O_EXCL on its own without O_CREAT is undefined.
+			   We deliberately ignore it as some versions of
+			   Linux CIFSFS can send a bare O_EXCL on the
+			   wire which other filesystems in the kernel
+			   ignore. See bug 9519 for details. */
+
+			/* Fallthrough. */
+
 		case 0:
 			/* File exists open. File not exist fail. */
 			create_disp = FILE_OPEN;
 			break;
-		case SMB_O_EXCL:
-			/* O_EXCL on its own without O_CREAT is undefined. */
 		default:
 			DEBUG(5,("smb_posix_open: invalid create mode 0x%x\n",
 				(unsigned int)wire_open_mode ));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list