[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Tue May 19 05:43:02 MDT 2015


The branch, master has been updated
       via  ffacfc1 auth: Make sure error_string is not used uninitialized
      from  175ae96 Remove [u]int[XX] defines from source3/include/includes.h

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


- Log -----------------------------------------------------------------
commit ffacfc1148b10e567b622c8ef6924a9c9156667e
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Tue May 19 10:35:47 2015 +0200

    auth: Make sure error_string is not used uninitialized
    
    Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
    Reviewed-by: Simo Sorce <idra at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Tue May 19 13:42:32 CEST 2015 on sn-devel-104

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

Summary of changes:
 auth/credentials/credentials_secrets.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
index 5945ffd..784e345 100644
--- a/auth/credentials/credentials_secrets.c
+++ b/auth/credentials/credentials_secrets.c
@@ -270,7 +270,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credenti
 {
 	NTSTATUS status;
 	char *filter;
-	char *error_string;
+	char *error_string = NULL;
 	const char *domain;
 	bool secrets_tdb_password_more_recent;
 	time_t secrets_tdb_lct = 0;
@@ -372,7 +372,8 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credenti
 				= talloc_asprintf(cred,
 						  "Failed to fetch machine account password for %s from both "
 						  "secrets.ldb (%s) and from %s",
-						  domain, error_string,
+						  domain,
+						  error_string == NULL ? "error" : error_string,
 						  dbwrap_name(db_ctx));
 		} else {
 			char *secrets_tdb_path;
@@ -387,10 +388,12 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credenti
 			error_string = talloc_asprintf(cred,
 						       "Failed to fetch machine account password from "
 						       "secrets.ldb: %s and failed to open %s",
-						       error_string, secrets_tdb_path);
+						       error_string == NULL ? "error" : error_string,
+						       secrets_tdb_path);
 		}
-		DEBUG(1, ("Could not find machine account in secrets database: %s: %s\n", 
-			  error_string, nt_errstr(status)));
+		DEBUG(1, ("Could not find machine account in secrets database: %s: %s\n",
+			  error_string == NULL ? "error" : error_string,
+			  nt_errstr(status)));
 		/* set anonymous as the fallback, if the machine account won't work */
 		cli_credentials_set_anonymous(cred);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list