[SCM] Samba Shared Repository - branch master updated

Gary Lockyer gary at samba.org
Thu Jul 11 05:26:02 UTC 2019


The branch, master has been updated
       via  9f6b87d3f6c ldap_server: Regression in 0559430ab6e5c48d6e853fda0d8b63f2e149015c
       via  fa551bf0a4a libcl/smb: clang: Fix 'Value stored to 'next_offset' is never read'
       via  71943ab53ee libcli/smb: clang: Fix 'value stored to 'p' is never read'
       via  f004f8a2349 auth/gensec: clang: Fix 'Value stored to 'status' is never read'
       via  d6c67f7c886 s4/auth/gensec: clang: Fix 'initialization value is never read'
       via  3a59a70dab3 nsswitch/libwbclient: clang: Fix Value stored to 'wbc_status' is never read
       via  c38a7745b18 s4/dsdb/common: clang: Fix access results in null pointer deref.
       via  c19f1c9a3e7 nsswitch/libwbclient: clang Fix Potential leak of memory
      from  c80606274fd ldb ABI bump for pyldb_Ldb_AsLdbContext change

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


- Log -----------------------------------------------------------------
commit 9f6b87d3f6cc9930d75c1f8d38ad4f5a37da34ab
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Mon Jul 8 16:59:33 2019 +1200

    ldap_server: Regression in 0559430ab6e5c48d6e853fda0d8b63f2e149015c
    
    Extended DN requests seem to have been incorrectly handled.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14029
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
    
    Autobuild-User(master): Gary Lockyer <gary at samba.org>
    Autobuild-Date(master): Thu Jul 11 05:25:26 UTC 2019 on sn-devel-184

commit fa551bf0a4ae5a6687a1ee638dc3c495a30a2e19
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 15:19:51 2019 +0000

    libcl/smb: clang: Fix 'Value stored to 'next_offset' is never read'
    
    Fixes:
    
     libcli/smb/smb2_create_blob.c:146:3: warning: Value stored to 'next_offset' is never read <--[clang]
                    next_offset += next_pad;
                    ^              ~~~~~~~~
    1 warning generated.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 71943ab53ee67dab0bb47753b78074917f38749e
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 15:16:57 2019 +0000

    libcli/smb: clang: Fix 'value stored to 'p' is never read'
    
    Fixes:
    
    libcli/smb/smb1cli_session.c:226:2: warning: Value stored to 'p' is never read <--[clang]
            p += ret;
            ^    ~~~
    libcli/smb/smb1cli_session.c:517:2: warning: Value stored to 'p' is never read <--[clang]
            p += ret;
            ^    ~~~
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit f004f8a23493fba882324131e68a046ef84b8de5
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 13:52:26 2019 +0000

    auth/gensec: clang: Fix 'Value stored to 'status' is never read'
    
    Fixes:
    
    auth/gensec/spnego.c:877:2: warning: Value stored to 'status' is never read <--[clang]
            status = sub_status;
            ^        ~~~~~~~~~~
    1 warning generated.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit d6c67f7c886c67363c4c1ef139cc366aadf90142
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 13:49:30 2019 +0000

    s4/auth/gensec: clang: Fix 'initialization value is never read'
    
    Fixes:
    
    source4/auth/gensec/gensec_gssapi.c:431:11: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
            NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
                     ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 3a59a70dab359c4a1e992625b7adaa15f37a10ca
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 13:46:39 2019 +0000

    nsswitch/libwbclient: clang: Fix Value stored to 'wbc_status' is never read
    
    Fixes:
    
    nsswitch/libwbclient/wbc_util.c:123:3: warning: Value stored to 'wbc_status' is never read <--[clang]
                    wbc_status = WBC_ERR_SUCCESS;
                    ^            ~~~~~~~~~~~~~~~
    1 warning generated.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit c38a7745b18ff83ad0097e604967a2501e88d1e1
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 13:43:20 2019 +0000

    s4/dsdb/common: clang: Fix access results in null pointer deref.
    
    Fixes:
    
    source4/dsdb/common/util_trusts.c:2915:21: warning: Access to field 'sid' results in a dereference of a null pointer (loaded from field 'tdo') <--[clang]
            d->di.domain_sid = d->tdo->sid;
                               ^  ~~~
    1 warning generated.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit c19f1c9a3e7fc103754703dff11aa3b63b1edb95
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jul 8 12:12:59 2019 +0000

    nsswitch/libwbclient: clang Fix Potential leak of memory
    
    Fixes:
    
    nsswitch/libwbclient/wbc_sid.c:848:2: warning: Potential leak of memory pointed to by 'extra_data'
            free(extra_data);
            ^
    1 warning generated.
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

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

Summary of changes:
 auth/gensec/spnego.c                | 2 --
 libcli/smb/smb1cli_session.c        | 2 --
 libcli/smb/smb2_create_blob.c       | 1 -
 nsswitch/libwbclient/wbc_sid.c      | 6 ++++--
 nsswitch/libwbclient/wbc_util.c     | 1 -
 source4/auth/gensec/gensec_gssapi.c | 2 +-
 source4/dsdb/common/util_trusts.c   | 8 ++++++++
 source4/ldap_server/ldap_backend.c  | 1 +
 8 files changed, 14 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c
index 0b3fbdce7ac..9e279d89850 100644
--- a/auth/gensec/spnego.c
+++ b/auth/gensec/spnego.c
@@ -874,8 +874,6 @@ static NTSTATUS gensec_spnego_client_negTokenTarg_finish(
 	NTSTATUS status;
 	struct spnego_data spnego_out;
 
-	status = sub_status;
-
 	if (!spnego_state->sub_sec_ready) {
 		/*
 		 * We're not yet ready to deal with signatures.
diff --git a/libcli/smb/smb1cli_session.c b/libcli/smb/smb1cli_session.c
index 11614df0ae4..a8ad9b87695 100644
--- a/libcli/smb/smb1cli_session.c
+++ b/libcli/smb/smb1cli_session.c
@@ -223,7 +223,6 @@ static void smb1cli_session_setup_lm21_done(struct tevent_req *subreq)
 	if (tevent_req_nterror(req, status)) {
 		return;
 	}
-	p += ret;
 
 	smb1cli_session_set_id(state->session, state->out_session_id);
 	smb1cli_session_set_action(state->session, state->out_action);
@@ -514,7 +513,6 @@ static void smb1cli_session_setup_nt1_done(struct tevent_req *subreq)
 	if (tevent_req_nterror(req, status)) {
 		return;
 	}
-	p += ret;
 
 	smb1cli_session_set_id(state->session, state->out_session_id);
 	smb1cli_session_set_action(state->session, state->out_action);
diff --git a/libcli/smb/smb2_create_blob.c b/libcli/smb/smb2_create_blob.c
index 457ed290fba..bb994f28e2f 100644
--- a/libcli/smb/smb2_create_blob.c
+++ b/libcli/smb/smb2_create_blob.c
@@ -143,7 +143,6 @@ static NTSTATUS smb2_create_blob_push_one(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer
 	memcpy(buffer->data+ofs+blob_offset, blob->data.data, blob->data.length);
 	if (next_pad > 0) {
 		memset(buffer->data+ofs+next_offset, 0, next_pad);
-		next_offset += next_pad;
 	}
 
 	return NT_STATUS_OK;
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index cec7b519bfd..aab96cf9188 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -792,12 +792,14 @@ wbcErr wbcCtxGetSidAliases(struct wbcContext *ctx,
 		sid_len = wbcSidToStringBuf(&sids[i], sid_str, sizeof(sid_str));
 
 		if (buflen < extra_data_len + sid_len + 2) {
+			char * tmp_data = NULL;
 			buflen *= 2;
-			extra_data = (char *)realloc(extra_data, buflen);
-			if (!extra_data) {
+			tmp_data = (char *)realloc(extra_data, buflen);
+			if (!tmp_data) {
 				wbc_status = WBC_ERR_NO_MEMORY;
 				BAIL_ON_WBC_ERROR(wbc_status);
 			}
+			extra_data = tmp_data;
 		}
 
 		strncpy(&extra_data[extra_data_len], sid_str,
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index 476ed50fa44..bd2d0f8b399 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -120,7 +120,6 @@ wbcErr wbcCtxInterfaceDetails(struct wbcContext *ctx,
 	if (wbc_status == WBC_ERR_DOMAIN_NOT_FOUND) {
 		/* maybe it's a standalone server */
 		domain = NULL;
-		wbc_status = WBC_ERR_SUCCESS;
 	} else {
 		BAIL_ON_WBC_ERROR(wbc_status);
 	}
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 4577c91c93a..afcc9e91bed 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -428,7 +428,7 @@ static NTSTATUS gensec_gssapi_update_internal(struct gensec_security *gensec_sec
 {
 	struct gensec_gssapi_state *gensec_gssapi_state
 		= talloc_get_type(gensec_security->private_data, struct gensec_gssapi_state);
-	NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
+	NTSTATUS nt_status;
 	OM_uint32 maj_stat, min_stat;
 	OM_uint32 min_stat2;
 	gss_buffer_desc input_token = { 0, NULL };
diff --git a/source4/dsdb/common/util_trusts.c b/source4/dsdb/common/util_trusts.c
index d2183911470..b4571dca957 100644
--- a/source4/dsdb/common/util_trusts.c
+++ b/source4/dsdb/common/util_trusts.c
@@ -2912,6 +2912,14 @@ NTSTATUS dsdb_trust_routing_table_load(struct ldb_context *sam_ctx,
 		return status;
 	}
 
+	/*
+	 * d->tdo should not be NULL of status above is 'NT_STATUS_OK'
+	 * check is needed to satisfy clang static checker
+	*/
+	if (d->tdo == NULL) {
+		TALLOC_FREE(frame);
+		return NT_STATUS_NO_MEMORY;
+	}
 	d->di.domain_sid = d->tdo->sid;
 	d->di.netbios_domain_name.string = d->tdo->netbios_name.string;
 	d->di.dns_domain_name.string = d->tdo->domain_name.string;
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index c6a65122ab0..bf724335a25 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -826,6 +826,7 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
 		} else {
 			extended_type = 0;
 		}
+		callback_ctx->extended_type = extended_type;
 	}
 
 	notification_control = ldb_request_get_control(lreq, LDB_CONTROL_NOTIFICATION_OID);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list