[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Fri Jan 3 01:31:02 UTC 2020


The branch, master has been updated
       via  1d0ffcf30e6 smbd: Remove an unused parameter from defer_open()
       via  ed3ee452549 smbd: Avoid a "? True : False"
       via  5954a0688ae lsasd: Align integer types
       via  fd406528b79 dsdb: Align integer types
       via  f53c8fbd7ff audit_log: Align integer types
       via  605bb4e9077 ntlm_auth: Fix a DEBUG message
       via  ba97f408d81 lib: Remove an unused variable from security_token_debug()
      from  9edf15afc21 ctdb-tests: Skip some tests that don't work with IPv6

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


- Log -----------------------------------------------------------------
commit 1d0ffcf30e625e7570daa800cf5adf3113c99ce5
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 22 18:20:12 2019 +0100

    smbd: Remove an unused parameter from defer_open()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Fri Jan  3 01:30:24 UTC 2020 on sn-devel-184

commit ed3ee452549f5c25800dd7da1c6dc30a826fe28f
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Dec 16 16:47:38 2019 +0100

    smbd: Avoid a "? True : False"
    
    VALID_STAT() already is a boolean expression
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 5954a0688ae7fa992f8b5a19793b8662ca2794e1
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Dec 7 14:13:04 2019 +0100

    lsasd: Align integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit fd406528b79a2fe4aefe0e04495cdaebe381e3d1
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 1 16:21:12 2019 +0100

    dsdb: Align integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit f53c8fbd7ff2be62c1c488cd56507516d85c670d
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 1 16:10:18 2019 +0100

    audit_log: Align integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 605bb4e9077aca1fa06c1c5beca42ca3b91308f7
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Dec 30 13:56:14 2019 +0100

    ntlm_auth: Fix a DEBUG message
    
    This is not routine auth_generic_prepare
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit ba97f408d81e98863732a8c6bcb59de7a8fedd6b
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 2 11:15:48 2020 +0100

    lib: Remove an unused variable from security_token_debug()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

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

Summary of changes:
 libcli/security/security_token.c                            |  8 --------
 source3/rpc_server/lsasd.c                                  |  2 +-
 source3/smbd/open.c                                         |  8 +++-----
 source3/utils/ntlm_auth.c                                   |  2 +-
 source4/dsdb/samdb/ldb_modules/audit_log.c                  |  2 +-
 source4/dsdb/samdb/ldb_modules/encrypted_secrets.c          | 13 ++++++-------
 .../dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c   |  3 ++-
 7 files changed, 14 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/security_token.c b/libcli/security/security_token.c
index de75033deae..ef6ee0ff661 100644
--- a/libcli/security/security_token.c
+++ b/libcli/security/security_token.c
@@ -46,7 +46,6 @@ struct security_token *security_token_initialise(TALLOC_CTX *mem_ctx)
 ****************************************************************************/
 void security_token_debug(int dbg_class, int dbg_lev, const struct security_token *token)
 {
-	TALLOC_CTX *mem_ctx;
 	uint32_t i;
 
 	if (!token) {
@@ -54,11 +53,6 @@ void security_token_debug(int dbg_class, int dbg_lev, const struct security_toke
 		return;
 	}
 
-	mem_ctx = talloc_init("security_token_debug()");
-	if (!mem_ctx) {
-		return;
-	}
-
 	DEBUGC(dbg_class, dbg_lev, ("Security token SIDs (%lu):\n",
 				       (unsigned long)token->num_sids));
 	for (i = 0; i < token->num_sids; i++) {
@@ -70,8 +64,6 @@ void security_token_debug(int dbg_class, int dbg_lev, const struct security_toke
 	}
 
 	security_token_debug_privileges(dbg_class, dbg_lev, token);
-
-	talloc_free(mem_ctx);
 }
 
 /* These really should be cheaper... */
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c
index 0d8ba304f67..556a8299072 100644
--- a/source3/rpc_server/lsasd.c
+++ b/source3/rpc_server/lsasd.c
@@ -597,7 +597,7 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
 	struct dcerpc_binding_vector *v, *v_orig;
 	TALLOC_CTX *tmp_ctx;
 	NTSTATUS status;
-	uint32_t i;
+	int i;
 	int fd = -1;
 	int rc;
 	bool ok = false;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a999f86dd44..a012e33316f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2673,7 +2673,6 @@ static void defer_open_done(struct tevent_req *req);
 static void defer_open(struct share_mode_lock *lck,
 		       struct timeval timeout,
 		       struct smb_request *req,
-		       bool delayed_for_oplocks,
 		       struct file_id id)
 {
 	struct deferred_open_record *open_rec = NULL;
@@ -2687,11 +2686,10 @@ static void defer_open(struct share_mode_lock *lck,
 	abs_timeout = timeval_sum(&req->request_time, &timeout);
 
 	DBG_DEBUG("request time [%s] timeout [%s] mid [%" PRIu64 "] "
-		  "delayed_for_oplocks [%s] file_id [%s]\n",
+		  "file_id [%s]\n",
 		  timeval_str_buf(&req->request_time, false, true, &tvbuf1),
 		  timeval_str_buf(&abs_timeout, false, true, &tvbuf2),
 		  req->mid,
-		  delayed_for_oplocks ? "yes" : "no",
 		  file_id_str_buf(id, &fbuf));
 
 	open_rec = talloc_zero(NULL, struct deferred_open_record);
@@ -2980,7 +2978,7 @@ static void schedule_defer_open(struct share_mode_lock *lck,
 		return;
 	}
 
-	defer_open(lck, timeout, req, true, id);
+	defer_open(lck, timeout, req, id);
 }
 
 /****************************************************************************
@@ -4197,7 +4195,7 @@ static NTSTATUS open_directory(connection_struct *conn,
 			       files_struct **result)
 {
 	files_struct *fsp = NULL;
-	bool dir_existed = VALID_STAT(smb_dname->st) ? True : False;
+	bool dir_existed = VALID_STAT(smb_dname->st);
 	struct share_mode_lock *lck = NULL;
 	NTSTATUS status;
 	struct timespec mtimespec;
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 289f648006f..aeae460ce8d 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -1197,7 +1197,7 @@ static NTSTATUS ntlm_auth_prepare_gensec_server(TALLOC_CTX *mem_ctx,
 	 */
 	server_credentials = cli_credentials_init_anon(tmp_ctx);
 	if (!server_credentials) {
-		DEBUG(0, ("auth_generic_prepare: Failed to init server credentials\n"));
+		DBG_ERR("Failed to init server credentials\n");
 		return NT_STATUS_NO_MEMORY;
 	}
 
diff --git a/source4/dsdb/samdb/ldb_modules/audit_log.c b/source4/dsdb/samdb/ldb_modules/audit_log.c
index ef674950100..7cc3ff67d77 100644
--- a/source4/dsdb/samdb/ldb_modules/audit_log.c
+++ b/source4/dsdb/samdb/ldb_modules/audit_log.c
@@ -109,7 +109,7 @@ struct audit_private {
  */
 static bool has_password_changed(const struct ldb_message *message)
 {
-	int i;
+	unsigned int i;
 	if (message == NULL) {
 		return false;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c b/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c
index 7e6d4b160d4..d3ce7e31642 100644
--- a/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c
+++ b/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c
@@ -263,7 +263,7 @@ static int load_keys(struct ldb_module *module, struct es_data *data)
  */
 static bool should_encrypt(const struct ldb_message_element *el)
 {
-	int i;
+	size_t i;
 
 	for (i = 0; i < ARRAY_SIZE(secret_attributes); i++) {
 		if (strcasecmp(secret_attributes[i], el->name) == 0) {
@@ -748,7 +748,7 @@ static struct ldb_message_element *encrypt_element(
 	const struct es_data *data)
 {
 	struct ldb_message_element* enc;
-	int i;
+	unsigned int i;
 
 	enc = talloc_zero(ctx, struct ldb_message_element);
 	if (enc == NULL) {
@@ -818,10 +818,9 @@ static const struct ldb_message *encrypt_secret_attributes(
 	const struct ldb_message *msg,
 	const struct es_data *data)
 {
-
 	struct ldb_message *encrypted_msg = NULL;
 
-	int i;
+	unsigned int i;
 
 	if (ldb_dn_is_special(msg->dn)) {
 		return NULL;
@@ -1003,7 +1002,7 @@ static struct ldb_message_element *decrypt_element(
 	struct ldb_message_element* el,
 	struct es_data *data)
 {
-	int i;
+	unsigned int i;
 	struct ldb_message_element* dec =
 		talloc_zero(ctx, struct ldb_message_element);
 
@@ -1069,8 +1068,8 @@ static int decrypt_secret_attributes(struct ldb_context *ldb,
 				      struct ldb_message *msg,
 				      struct es_data *data)
 {
-
-	int i, ret;
+	size_t i;
+	int ret;
 
 	if (ldb_dn_is_special(msg->dn)) {
 		return LDB_SUCCESS;
diff --git a/source4/dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c b/source4/dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c
index 6357deab7ce..e639d4cbb0a 100644
--- a/source4/dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c
+++ b/source4/dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c
@@ -672,7 +672,8 @@ static void test_message_encryption_decryption(void **state)
 		struct es_data);
 	struct ldb_message_element *el = NULL;
 	int ret = LDB_SUCCESS;
-	int i, j;
+	size_t i;
+	unsigned int j;
 
 	msg->dn = ldb_dn_new(msg, ldb, "dc=test");
 	ldb_msg_add_string(msg, "cmocka_test_name01", "value01");


-- 
Samba Shared Repository



More information about the samba-cvs mailing list