summaryrefslogtreecommitdiffstats
path: root/server/responder
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-11-09 12:11:49 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-11-09 13:50:31 -0500
commit64351061595d3b954121d59bc394350ec6cf8ab4 (patch)
treec3480b91137cf906fc68793fa10f13ea11565d7d /server/responder
parent47d61ca8db78e5976400dbe08f426c0985e6e801 (diff)
downloadsssd-64351061595d3b954121d59bc394350ec6cf8ab4.tar.gz
sssd-64351061595d3b954121d59bc394350ec6cf8ab4.tar.xz
sssd-64351061595d3b954121d59bc394350ec6cf8ab4.zip
Fix segfault on unknown user/domain
Diffstat (limited to 'server/responder')
-rw-r--r--server/responder/pam/pamsrv_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 815a0f969..f4d9c4d7f 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -539,9 +539,9 @@ static void pam_reply(struct pam_auth_req *preq)
}
/* If this was a successful login, save the lastLogin time */
- if (preq->domain->cache_credentials &&
- pd->cmd == SSS_PAM_AUTHENTICATE &&
+ if (pd->cmd == SSS_PAM_AUTHENTICATE &&
pd->pam_status == PAM_SUCCESS &&
+ preq->domain->cache_credentials &&
!pd->offline_auth &&
!pd->last_auth_saved &&
NEED_CHECK_PROVIDER(preq->domain->provider)) {