[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Wed Sep 19 23:19:01 MDT 2012


The branch, master has been updated
       via  bc77745 s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu()
       via  38994f6 s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
       via  d1de2b4 s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
      from  03055af s3: Fix idmap_hash

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


- Log -----------------------------------------------------------------
commit bc77745cfaf502e24575dab9ae323643d94760e3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 20 00:42:02 2012 +0200

    s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu()
    
    metze
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Thu Sep 20 07:18:31 CEST 2012 on sn-devel-104

commit 38994f6ff34316ad08961f62a1f57429f7968e70
Author: Michael Adam <obnox at samba.org>
Date:   Wed Sep 19 02:57:37 2012 +0200

    s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
    
    in idmap_tdb_common_sids_to_unixids()

commit d1de2b4d3999dda96df9156da30a239af3b2b88e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Sep 19 02:57:37 2012 +0200

    s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
    
    in idmap_tdb_common_unixids_to_sids()

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

Summary of changes:
 source3/smbd/smb2_server.c          |    2 +-
 source3/winbindd/idmap_tdb_common.c |   16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index be7997f..fd90b2f 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2017,7 +2017,7 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 		status = smb2_signing_check_pdu(signing_key,
 						conn->protocol,
 						SMBD_SMB2_IN_HDR_IOV(req),
-						SMBD_SMB2_NUM_IOV_PER_REQ);
+						SMBD_SMB2_NUM_IOV_PER_REQ - 1);
 		if (!NT_STATUS_IS_OK(status)) {
 			return smbd_smb2_request_error(req, status);
 		}
diff --git a/source3/winbindd/idmap_tdb_common.c b/source3/winbindd/idmap_tdb_common.c
index 2b16d0b..5713fe2 100644
--- a/source3/winbindd/idmap_tdb_common.c
+++ b/source3/winbindd/idmap_tdb_common.c
@@ -320,9 +320,11 @@ NTSTATUS idmap_tdb_common_unixids_to_sids(struct idmap_domain * dom,
 	    talloc_get_type_abort(dom->private_data,
 				  struct idmap_tdb_common_context);
 
-	unixid_to_sid_fn =
-	    (ctx->unixid_to_sid_fn ==
-	     NULL) ? idmap_tdb_common_unixid_to_sid : ctx->unixid_to_sid_fn;
+	if (ctx->unixid_to_sid_fn == NULL) {
+		unixid_to_sid_fn = idmap_tdb_common_unixid_to_sid;
+	} else {
+		unixid_to_sid_fn = ctx->unixid_to_sid_fn;
+	}
 
 	/* initialize the status to avoid surprise */
 	for (i = 0; ids[i]; i++) {
@@ -636,9 +638,11 @@ NTSTATUS idmap_tdb_common_sids_to_unixids(struct idmap_domain * dom,
 	state.dom = dom;
 	state.ids = ids;
 	state.allocate_unmapped = false;
-	state.sid_to_unixid_fn =
-	    (ctx->sid_to_unixid_fn ==
-	     NULL) ? idmap_tdb_common_sid_to_unixid : ctx->sid_to_unixid_fn;
+	if (ctx->sid_to_unixid_fn == NULL) {
+		state.sid_to_unixid_fn = idmap_tdb_common_sid_to_unixid;
+	} else {
+		state.sid_to_unixid_fn = ctx->sid_to_unixid_fn;
+	}
 
 	ret = idmap_tdb_common_sids_to_unixids_action(ctx->db, &state);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list