summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 815a0f96..f4d9c4d7 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)) {