diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2019-05-07 12:51:09 +1200 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2019-05-09 22:39:27 +0000 |
commit | 2bd79a0cd026d3fedeb126c023b01f9ee76a81df (patch) | |
tree | aa31d386e1b0b84565a728110a1318280ca70a4b /auth | |
parent | b18f0dce38a19e47f86d868bc5f052f72e294792 (diff) | |
download | samba-2bd79a0cd026d3fedeb126c023b01f9ee76a81df.tar.gz |
auth/creds/guess: avoid segfault with NULL lp (CID 241187)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/credentials/credentials.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index 7ef58d0752c..befce2c2119 100644 --- a/auth/credentials/credentials.c +++ b/auth/credentials/credentials.c @@ -965,7 +965,8 @@ _PUBLIC_ void cli_credentials_guess(struct cli_credentials *cred, cli_credentials_parse_password_file(cred, p, CRED_GUESS_FILE); } - if (cli_credentials_get_kerberos_state(cred) != CRED_DONT_USE_KERBEROS) { + if (lp_ctx != NULL && + cli_credentials_get_kerberos_state(cred) != CRED_DONT_USE_KERBEROS) { cli_credentials_set_ccache(cred, lp_ctx, NULL, CRED_GUESS_FILE, &error_string); } |