[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sun Jun 4 12:43:02 UTC 2023


The branch, master has been updated
       via  22ab42c1007 s3/utils: avoid erronous NO MEMORY detection
      from  9c24f853a84 smbd: remove comments about deprecated 'write cache size'

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


- Log -----------------------------------------------------------------
commit 22ab42c1007775abca0b578744d4c18a85cda627
Author: Noel Power <noel.power at suse.com>
Date:   Fri Jun 2 14:27:55 2023 +0100

    s3/utils: avoid erronous NO MEMORY detection
    
    since 5cc3c1b5f6b0289f91c01b20989558badc28fd61 if we don't have
    a realm specified either on cmdline or in conf file we try to
    copy (talloc_strdup) a NULL variable which triggers a NO_MEMORY
    error when we check the result of the copy
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15384
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Sun Jun  4 12:42:16 UTC 2023 on atb-devel-224

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

Summary of changes:
 source3/utils/net_ads.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 9a3ee73567e..f0e5e0afe92 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -753,10 +753,12 @@ retry:
 	} else if (ads->auth.realm == NULL) {
 		const char *c_realm = cli_credentials_get_realm(c->creds);
 
-		ads->auth.realm = talloc_strdup(ads, c_realm);
-		if (ads->auth.realm == NULL) {
-			TALLOC_FREE(ads);
-			return ADS_ERROR(LDAP_NO_MEMORY);
+		if (c_realm != NULL) {
+			ads->auth.realm = talloc_strdup(ads, c_realm);
+			if (ads->auth.realm == NULL) {
+				TALLOC_FREE(ads);
+				return ADS_ERROR(LDAP_NO_MEMORY);
+			}
 		}
 	}
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list