[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Mar 15 16:05:31 MDT 2010


The branch, master has been updated
       via  704a607... Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()
      from  33bd9b4... Remove reference to conn->admin_user in preparation for removal.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 704a607e3c3a5c3e727b386fab9dbcdff56b5ac4
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 15 15:04:18 2010 -0700

    Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()
    
    Make ea data checks identical for trans2open and trans2mkdir.
    
    Jeremy.

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

Summary of changes:
 source3/smbd/trans2.c |   29 +++++++++++++----------------
 1 files changed, 13 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 1870cbc..09b1621 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1062,12 +1062,7 @@ static void call_trans2open(connection_struct *conn,
 	}
 
 	/* Any data in this call is an EA list. */
-	if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) {
-		reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED);
-		goto out;
-	}
-
-	if (total_data != 4) {
+	if (total_data && (total_data != 4)) {
 		if (total_data < 10) {
 			reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 			goto out;
@@ -1086,9 +1081,11 @@ static void call_trans2open(connection_struct *conn,
 			reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 			goto out;
 		}
-	} else if (IVAL(pdata,0) != 4) {
-		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
-		goto out;
+
+		if (!lp_ea_support(SNUM(conn))) {
+			reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED);
+			goto out;
+		}
 	}
 
 	status = SMB_VFS_CREATE_FILE(
@@ -7916,19 +7913,14 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
 		return;
         }
 
-	/* Any data in this call is an EA list. */
-	if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) {
-		reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED);
-		goto out;
-	}
-
 	/*
 	 * OS/2 workplace shell seems to send SET_EA requests of "null"
 	 * length (4 bytes containing IVAL 4).
 	 * They seem to have no effect. Bug #3212. JRA.
 	 */
 
-	if (total_data != 4) {
+	if (total_data && (total_data != 4)) {
+		/* Any data in this call is an EA list. */
 		if (total_data < 10) {
 			reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 			goto out;
@@ -7947,6 +7939,11 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
 			reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 			goto out;
 		}
+
+		if (!lp_ea_support(SNUM(conn))) {
+			reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED);
+			goto out;
+		}
 	}
 	/* If total_data == 4 Windows doesn't care what values
 	 * are placed in that field, it just ignores them.


-- 
Samba Shared Repository


More information about the samba-cvs mailing list