summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-04-23 01:20:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:20 -0500
commit829f10ba51da3c8f5bfb6257135aad5812308a59 (patch)
tree324691d57f73ec908d1db2a506442c624f982ead /source3
parent6f3fe3a85ad02a908c60d6e4bd8a8efe29bda1ad (diff)
downloadsamba-829f10ba51da3c8f5bfb6257135aad5812308a59.tar.gz
samba-829f10ba51da3c8f5bfb6257135aad5812308a59.tar.bz2
samba-829f10ba51da3c8f5bfb6257135aad5812308a59.zip
r333: other half of fix for winbindd crask from gd@suse.de
(This used to be commit f902d52c82c31d38157d4f1c77c27ee1c395afc3)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_pam.c10
1 files changed, 7 insertions, 3 deletions
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);