s4:auth/credentials/credentials.c - Initialise the "lm_response" and "nt_response...
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Feb 2010 13:58:27 +0000 (14:58 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Feb 2010 14:04:07 +0000 (15:04 +0100)
In some cases those structures are not initialised and the whole authentication
system crashes with a SIGSEGV. Bug discovered by Matthieu Patou in bug #6755.

source4/auth/credentials/credentials.c

index 549c2691f0301f246b125eda0a79722a905968fe..959068c24d9e4749c9a64a30c5ef8cee0094c7fb 100644 (file)
@@ -68,6 +68,11 @@ _PUBLIC_ struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx)
 
        cred->nt_hash = NULL;
 
+       cred->lm_response.data = NULL;
+       cred->lm_response.length = 0;
+       cred->nt_response.data = NULL;
+       cred->nt_response.length = 0;
+
        cred->ccache = NULL;
        cred->client_gss_creds = NULL;
        cred->keytab = NULL;