[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Jun 16 02:22:05 UTC 2018


The branch, master has been updated
       via  455cd66 addns: Fix a typo
       via  c4021d0 dsdb: Fix a typo
       via  bced81c winbindd: Fix winbindd_ping_dc_recv
       via  e67d605 winbindd: Add a missing NULL check
       via  b394026 winbindd: Do an early TALLOC_FREE
       via  73b183e winbindd: Use is_domain_offline() where appropriate
       via  ea4b40e winbindd: Align integer types in for loops
       via  4dac6e7 Possible memory leak in map_info6_to_validation
      from  3ca1c09 Fix several mem leaks in ldb_index ldb_search ldb_tdb

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


- Log -----------------------------------------------------------------
commit 455cd6624ef29b619e50158f3f44ac3a72f25424
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 15 14:56:57 2018 +0200

    addns: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jun 16 04:21:18 CEST 2018 on sn-devel-144

commit c4021d09218a5b441677a15ec36e618076ce54d7
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 14 16:47:26 2018 +0200

    dsdb: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit bced81cd6c2d27fb9fe71fc572098a1b1c933fca
Author: Volker Lendecke <vl at samba.org>
Date:   Sat May 19 18:40:44 2018 +0200

    winbindd: Fix winbindd_ping_dc_recv
    
    tevent_req_simple_recv_ntstatus is only for the one-liner without any
    additional functionality.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e67d605b8bc4338ca9f63265588143788c0d4bed
Author: Volker Lendecke <vl at samba.org>
Date:   Sat May 19 18:39:36 2018 +0200

    winbindd: Add a missing NULL check
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b394026f478b038e734fd3952909c6337fbb5721
Author: Volker Lendecke <vl at samba.org>
Date:   Sat May 19 18:31:17 2018 +0200

    winbindd: Do an early TALLOC_FREE
    
    Leave the if-block without leaking
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 73b183e1382117f35033bbe65316d30b966e9032
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 18 16:15:06 2018 +0200

    winbindd: Use is_domain_offline() where appropriate
    
    That if-condition is precisely covered by the helper routine
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ea4b40e65a92f173d5bda8905f99a002a4bd8151
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 18 14:47:24 2018 +0200

    winbindd: Align integer types in for loops
    
    Iterate over the same type as the loop limit
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 4dac6e7cd08ab226eff9415b4924b6dcd8e5178d
Author: Swen Schillig <swen at vnet.ibm.com>
Date:   Fri May 25 10:06:21 2018 +0200

    Possible memory leak in map_info6_to_validation
    
    If the call to copy_netr_SamInfo6 returns an error status,
    the allocated memory for "validation" needs to be free'd before returning.
    
    Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Christof Schmitt <cs at samba.org>

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

Summary of changes:
 lib/addns/dnsgss.c                  | 2 +-
 source3/rpc_client/util_netlogon.c  | 1 +
 source3/winbindd/winbindd_cache.c   | 4 ++--
 source3/winbindd/winbindd_ping_dc.c | 8 +++++++-
 source3/winbindd/winbindd_util.c    | 4 ++--
 source4/dsdb/dns/dns_update.c       | 2 +-
 6 files changed, 14 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c
index fd1af7e..a446da6 100644
--- a/lib/addns/dnsgss.c
+++ b/lib/addns/dnsgss.c
@@ -131,7 +131,7 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx,
 
 			/* Windows 2000 DNS is broken and requires the
 			   TKEY payload in the Answer section instead
-			   of the Additional seciton like Windows 2003 */
+			   of the Additional section like Windows 2003 */
 
 			if ( srv_type == DNS_SRV_WIN2000 ) {
 				err = dns_add_rrec(req, rec, &req->num_answers,
diff --git a/source3/rpc_client/util_netlogon.c b/source3/rpc_client/util_netlogon.c
index 2d73bc9..c57979a 100644
--- a/source3/rpc_client/util_netlogon.c
+++ b/source3/rpc_client/util_netlogon.c
@@ -378,6 +378,7 @@ NTSTATUS map_info6_to_validation(TALLOC_CTX *mem_ctx,
 				    info6,
 				    &validation->sam6);
 	if (!NT_STATUS_IS_OK(status)) {
+		TALLOC_FREE(validation);
 		return status;
 	}
 
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 2778e27..af67aa3 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -1123,7 +1123,7 @@ do_query:
 
 	/* If its not in cache and we are offline, then fail */
 
-	if ( get_global_winbindd_state_offline() || !domain->online ) {
+	if (is_domain_offline(domain)) {
 		DEBUG(8,("resolve_username_to_alias: rejecting query "
 			 "in offline mode\n"));
 		return NT_STATUS_NOT_FOUND;
@@ -1203,7 +1203,7 @@ do_query:
 
 	/* If its not in cache and we are offline, then fail */
 
-	if ( get_global_winbindd_state_offline() || !domain->online ) {
+	if (is_domain_offline(domain)) {
 		DEBUG(8,("resolve_alias_to_username: rejecting query "
 			 "in offline mode\n"));
 		return NT_STATUS_NOT_FOUND;
diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c
index c1a0a7b..8f56a9e 100644
--- a/source3/winbindd/winbindd_ping_dc.c
+++ b/source3/winbindd/winbindd_ping_dc.c
@@ -70,6 +70,8 @@ struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
 			}
 
 			state->dcname = talloc_asprintf(state, "%s.%s", h, d);
+			TALLOC_FREE(h);
+
 			if (tevent_req_nomem(state->dcname, req)) {
 				return tevent_req_post(req, ev);
 			}
@@ -127,8 +129,12 @@ NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
 
 	if (state->dcname) {
 		presp->extra_data.data = talloc_strdup(presp, state->dcname);
+		if (presp->extra_data.data == NULL) {
+			return NT_STATUS_NO_MEMORY;
+		}
 		presp->length += strlen((char *)presp->extra_data.data) + 1;
 	}
 
-	return tevent_req_simple_recv_ntstatus(req);
+	tevent_req_received(req);
+	return NT_STATUS_OK;
 }
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 9707574..71735ed 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -602,7 +602,7 @@ static void rescan_forest_root_trusts( void )
 {
 	struct winbindd_tdc_domain *dom_list = NULL;
         size_t num_trusts = 0;
-	int i;
+	size_t i;
 	NTSTATUS status;
 
 	/* The only transitive trusts supported by Windows 2003 AD are
@@ -679,7 +679,7 @@ static void rescan_forest_trusts( void )
 	struct winbindd_domain *d = NULL;
 	struct winbindd_tdc_domain *dom_list = NULL;
         size_t num_trusts = 0;
-	int i;
+	size_t i;
 	NTSTATUS status;
 
 	/* The only transitive trusts supported by Windows 2003 AD are
diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c
index 0655673..9385b35 100644
--- a/source4/dsdb/dns/dns_update.c
+++ b/source4/dsdb/dns/dns_update.c
@@ -1,5 +1,5 @@
 /*
-   Unix SMB/CIFS mplementation.
+   Unix SMB/CIFS Implementation.
 
    DNS update service
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list