[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Jun 13 11:41:03 UTC 2018


The branch, master has been updated
       via  15fa8f9 dsdb: Fix CID 1435968 Dereference before null check
       via  11cac8a dsdb: Fix CID 1435966 Unchecked return value
       via  9ec47b3 dsdb: Fix typos
       via  c403923 dsdb: Fix CID 1436918 Unchecked return value
       via  2678b4c dsdb: Fix CID 1436919 Unchecked return value
       via  7f75484 dsdb: Fix CID 1436920 Unchecked return value
      from  83cd68c Fix UDP DNS queries in addns

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


- Log -----------------------------------------------------------------
commit 15fa8f9f24c69832cc4f309e59ee6292a7c33938
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:31:15 2018 +0200

    dsdb: Fix CID 1435968 Dereference before null check
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Jun 13 13:40:56 CEST 2018 on sn-devel-144

commit 11cac8a21c500a3936a47d355133e347c0a843a0
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:22:10 2018 +0200

    dsdb: Fix CID 1435966 Unchecked return value
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 9ec47b3cffcb258f2885a731b49ed1085df508d8
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:18:18 2018 +0200

    dsdb: Fix typos
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c4039232e3393b4509c007e7c85474cfc6c686ef
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:15:55 2018 +0200

    dsdb: Fix CID 1436918 Unchecked return value
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 2678b4c25f4a669960af0196f8314ae51ee6347d
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:12:47 2018 +0200

    dsdb: Fix CID 1436919 Unchecked return value
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7f754843f51398d4c55ab7cd64b4b53754be3bb5
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 12 21:09:40 2018 +0200

    dsdb: Fix CID 1436920 Unchecked return value
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/audit_log.c         | 11 ++++++-----
 source4/dsdb/samdb/ldb_modules/partition.c         | 22 +++++++++++++---------
 .../dsdb/samdb/ldb_modules/tests/test_audit_log.c  |  4 +++-
 .../samdb/ldb_modules/tests/test_group_audit.c     |  4 +++-
 4 files changed, 25 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/audit_log.c b/source4/dsdb/samdb/ldb_modules/audit_log.c
index fd23876..23b4651 100644
--- a/source4/dsdb/samdb/ldb_modules/audit_log.c
+++ b/source4/dsdb/samdb/ldb_modules/audit_log.c
@@ -1172,6 +1172,7 @@ static int add_transaction_id(
 		talloc_get_type(ldb_module_get_private(module),
 				struct audit_context);
 	struct dsdb_control_transaction_identifier *transaction_id;
+	int ret;
 
 	transaction_id = talloc_zero(
 		req,
@@ -1181,11 +1182,11 @@ static int add_transaction_id(
 		return ldb_oom(ldb);
 	}
 	transaction_id->transaction_guid = ac->transaction_guid;
-	ldb_request_add_control(req,
-				DSDB_CONTROL_TRANSACTION_IDENTIFIER_OID,
-				false,
-				transaction_id);
-	return LDB_SUCCESS;
+	ret = ldb_request_add_control(req,
+				      DSDB_CONTROL_TRANSACTION_IDENTIFIER_OID,
+				      false,
+				      transaction_id);
+	return ret;
 
 }
 
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 6867cd7..49bdeb0 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -405,7 +405,7 @@ struct partition_copy_context {
  * A special DN has been updated in the primary partition. Now propagate those
  * changes to the remaining partitions.
  *
- * Note: that the operations are asyncchonous and this fuction is called
+ * Note: that the operations are asynchronous and this function is called
  *       from partition_copy_all_callback_handler in response to an async
  *       callback.
  */
@@ -504,10 +504,14 @@ static int partition_copy_all_callback_action(
 								 req_msg->elements[el_idx].name) != NULL) {
 						continue;
 					}
-					ldb_msg_add_empty(modify_msg,
-							  req_msg->elements[el_idx].name,
-							  LDB_FLAG_MOD_REPLACE,
-							  NULL);
+					pret = ldb_msg_add_empty(
+						modify_msg,
+						req_msg->elements[el_idx].name,
+						LDB_FLAG_MOD_REPLACE,
+						NULL);
+					if (pret != LDB_SUCCESS) {
+						return pret;
+					}
 				}
 			}
 		}
@@ -543,7 +547,6 @@ static int partition_copy_all_callback_handler(
 	struct ldb_reply *ares)
 {
 	struct partition_copy_context *ac = NULL;
-	int error = ares->error;
 
 	ac = talloc_get_type(
 		req->context,
@@ -570,8 +573,8 @@ static int partition_copy_all_callback_handler(
 			ac->request,
 			ares->referral);
 
-	case LDB_REPLY_DONE:
-		error = ares->error;
+	case LDB_REPLY_DONE: {
+		int error = ares->error;
 		if (error == LDB_SUCCESS) {
 			error = partition_copy_all_callback_action(
 				ac->module,
@@ -584,6 +587,7 @@ static int partition_copy_all_callback_handler(
 			ares->controls,
 			ares->response,
 			error);
+	}
 
 	default:
 		/* Can't happen */
@@ -671,7 +675,7 @@ static int partition_copy_all(
 		ldb_debug(
 			ldb,
 			LDB_DEBUG_ERROR,
-			"Unexpected opertation type (%d)\n", req->operation);
+			"Unexpected operation type (%d)\n", req->operation);
 		ret = LDB_ERR_OPERATIONS_ERROR;
 		break;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/tests/test_audit_log.c b/source4/dsdb/samdb/ldb_modules/tests/test_audit_log.c
index 3e57af1..567c5b3 100644
--- a/source4/dsdb/samdb/ldb_modules/tests/test_audit_log.c
+++ b/source4/dsdb/samdb/ldb_modules/tests/test_audit_log.c
@@ -194,6 +194,7 @@ static void test_get_password_action(void **state)
 	struct ldb_request *req = NULL;
 	struct ldb_reply *reply = NULL;
 	struct dsdb_control_password_acl_validation *pav = NULL;
+	int ret;
 
 	TALLOC_CTX *ctx = talloc_new(NULL);
 	ldb = ldb_init(ctx, NULL);
@@ -219,7 +220,8 @@ static void test_get_password_action(void **state)
 	/*
 	 * dsdb_control_password_acl_validation reset = false, expect "Change"
 	 */
-	ldb_build_mod_req(&req, ldb, ctx, NULL, NULL, NULL, NULL, NULL);
+	ret = ldb_build_mod_req(&req, ldb, ctx, NULL, NULL, NULL, NULL, NULL);
+	assert_int_equal(ret, LDB_SUCCESS);
 	reply = talloc_zero(ctx, struct ldb_reply);
 	pav = talloc_zero(req, struct dsdb_control_password_acl_validation);
 
diff --git a/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c b/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c
index 26392b7..2c32b65 100644
--- a/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c
+++ b/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c
@@ -189,11 +189,13 @@ static void add_session_data(
 	struct security_token *token = NULL;
 	struct dom_sid *sid = NULL;
 	struct GUID session_id;
+	bool ok;
 
 	sess = talloc_zero(ctx, struct auth_session_info);
 	token = talloc_zero(ctx, struct security_token);
 	sid = talloc_zero(ctx, struct dom_sid);
-	string_to_sid(sid, user_sid);
+	ok = string_to_sid(sid, user_sid);
+	assert_true(ok);
 	token->sids = sid;
 	sess->security_token = token;
 	GUID_from_string(session, &session_id);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list