[SCM] Samba Shared Repository - branch master updated

Noel Power npower at samba.org
Thu Feb 22 10:58:02 UTC 2024


The branch, master has been updated
       via  bdd739c1adb s3: winbindd: assign rangenum member after NULL check
       via  205866a1952 s3: winbindd: reduce scope of a variable
       via  cde71074e01 s3: winbindd: remove double initialization
      from  dd9b11acbc4 ctdb-protocol: Add missing push support for new controls

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


- Log -----------------------------------------------------------------
commit bdd739c1adb78f9b484b31100d9903408a7068ba
Author: Shaleen Bathla <shaleen.bathla at oracle.com>
Date:   Wed Feb 21 18:55:28 2024 +0530

    s3: winbindd: assign rangenum member after NULL check
    
    if we are doing NULL check for range, then we should assign its member
    after the NULL check.
    
    Signed-off-by: Shaleen Bathla <shaleen.bathla at oracle.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Noel Power <npower at samba.org>
    
    Autobuild-User(master): Noel Power <npower at samba.org>
    Autobuild-Date(master): Thu Feb 22 10:57:38 UTC 2024 on atb-devel-224

commit 205866a1952b2bf1aff5a1abed25b7149e442799
Author: Shaleen Bathla <shaleen.bathla at oracle.com>
Date:   Wed Feb 21 18:38:45 2024 +0530

    s3: winbindd: reduce scope of a variable
    
    reduce scope of variable as a best practice
    
    Signed-off-by: Shaleen Bathla <shaleen.bathla at oracle.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Noel Power <npower at samba.org>

commit cde71074e0145a76ea1b34a318e76bbc0450d90f
Author: Shaleen Bathla <shaleen.bathla at oracle.com>
Date:   Wed Feb 21 18:26:11 2024 +0530

    s3: winbindd: remove double initialization
    
    remove re-initialization of entry variable in for loop
    
    Signed-off-by: Shaleen Bathla <shaleen.bathla at oracle.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Noel Power <npower at samba.org>

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

Summary of changes:
 source3/winbindd/idmap_autorid_tdb.c | 3 ++-
 source3/winbindd/nss_info.c          | 2 +-
 source3/winbindd/winbindd_rpc.c      | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_autorid_tdb.c b/source3/winbindd/idmap_autorid_tdb.c
index 6c76764076a..68c4d2f3355 100644
--- a/source3/winbindd/idmap_autorid_tdb.c
+++ b/source3/winbindd/idmap_autorid_tdb.c
@@ -97,7 +97,6 @@ static NTSTATUS idmap_autorid_addrange_action(struct db_context *db,
 	ctx = (struct idmap_autorid_addrange_ctx *)private_data;
 	range = ctx->range;
 	acquire = ctx->acquire;
-	requested_rangenum = range->rangenum;
 
 	if (db == NULL) {
 		DEBUG(3, ("Invalid database argument: NULL\n"));
@@ -109,6 +108,8 @@ static NTSTATUS idmap_autorid_addrange_action(struct db_context *db,
 		return NT_STATUS_INVALID_PARAMETER;
 	}
 
+	requested_rangenum = range->rangenum;
+
 	DEBUG(10, ("Adding new range for domain %s "
 		   "(domain_range_index=%"PRIu32")\n",
 		   range->domsid, range->domain_range_index));
diff --git a/source3/winbindd/nss_info.c b/source3/winbindd/nss_info.c
index 9c502e84ef0..3b58ca29324 100644
--- a/source3/winbindd/nss_info.c
+++ b/source3/winbindd/nss_info.c
@@ -32,7 +32,7 @@ static struct nss_domain_entry *nss_domain_list = NULL;
 
 static struct nss_function_entry *nss_get_backend(const char *name )
 {
-	struct nss_function_entry *entry = backends;
+	struct nss_function_entry *entry = NULL;
 
 	for(entry = backends; entry; entry = entry->next) {
 		if ( strequal(entry->name, name) )
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 2b4a47e223d..ef015b2fbf2 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -323,7 +323,6 @@ NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx,
 				uint32_t **palias_rids)
 {
 #define MAX_SAM_ENTRIES_W2K 0x400 /* 1024 */
-	uint32_t num_query_sids = 0;
 	uint32_t num_queries = 1;
 	uint32_t num_aliases = 0;
 	uint32_t total_sids = 0;
@@ -337,6 +336,7 @@ NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx,
 	do {
 		/* prepare query */
 		struct lsa_SidArray sid_array;
+		uint32_t num_query_sids = 0;
 
 		ZERO_STRUCT(sid_array);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list