From 6207b76613168e6aa386b7b71b492b66b14fff57 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 28 Apr 2009 10:17:38 +0200 Subject: handle other pam calls when offline --- server/responder/pam/pamsrv_cmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/responder') diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index 4c7bf1f6..6d3f8991 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -172,6 +172,16 @@ static void pam_reply(struct pam_auth_req *preq) } } +/* TODO: we need the pam session cookie here to make sure that cached + * authentication was successful */ + if ((pd->cmd == SSS_PAM_SETCRED || pd->cmd == SSS_PAM_ACCT_MGMT || + pd->cmd == SSS_PAM_OPEN_SESSION || pd->cmd == SSS_PAM_CLOSE_SESSION) && + pd->pam_status == PAM_AUTHINFO_UNAVAIL) { + DEBUG(2, ("Assuming offline authentication " + "setting status for pam call %d to PAM_SUCCESS.\n", pd->cmd)); + pd->pam_status = PAM_SUCCESS; + } + cctx = preq->cctx; if (pd->response_delay > 0) { -- cgit