From 829f10ba51da3c8f5bfb6257135aad5812308a59 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 23 Apr 2004 01:20:23 +0000 Subject: r333: other half of fix for winbindd crask from gd@suse.de (This used to be commit f902d52c82c31d38157d4f1c77c27ee1c395afc3) --- source3/nsswitch/winbindd_pam.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index c5c9ca6322..c1840b6053 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -71,7 +71,7 @@ static NTSTATUS check_info3_in_group(TALLOC_CTX *mem_ctx, } if (!string_to_sid(&required_membership_sid, group_sid)) { - DEBUG(0, ("winbindd_pam_auth: could not parse %s as a SID!", + DEBUG(0, ("check_info3_in_group: could not parse %s as a SID!", group_sid)); return NT_STATUS_INVALID_PARAMETER; @@ -530,8 +530,12 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) } while ( (attempts < 2) && retry ); - clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &ret_creds); - + if (cli != NULL) { + /* We might have come out of the loop above with cli == NULL, + so don't dereference that. */ + clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &ret_creds); + } + if (NT_STATUS_IS_OK(result)) { netsamlogon_cache_store( cli->mem_ctx, &info3 ); wcache_invalidate_samlogon(find_domain_from_name(name_domain), &info3); -- cgit