diff options
author | Sumit Bose <sbose@redhat.com> | 2009-12-21 14:51:32 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-05 10:01:46 -0500 |
commit | 91e670f9928fe489fbdb2403b5bbf59bcc4564a2 (patch) | |
tree | 5b61c9b9a58e533bb5dbe42a77b5ab3449070506 /server/providers/krb5 | |
parent | 60d37b178ec248764abdc58ff486fc661d0ff77a (diff) | |
download | sssd-91e670f9928fe489fbdb2403b5bbf59bcc4564a2.tar.gz sssd-91e670f9928fe489fbdb2403b5bbf59bcc4564a2.tar.bz2 sssd-91e670f9928fe489fbdb2403b5bbf59bcc4564a2.zip |
Return an error for an unknown PAM request
Diffstat (limited to 'server/providers/krb5')
-rw-r--r-- | server/providers/krb5/krb5_auth.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/server/providers/krb5/krb5_auth.c b/server/providers/krb5/krb5_auth.c index a124371e..a9f577d7 100644 --- a/server/providers/krb5/krb5_auth.c +++ b/server/providers/krb5/krb5_auth.c @@ -713,12 +713,24 @@ void krb5_pam_handler(struct be_req *be_req) pd = talloc_get_type(be_req->req_data, struct pam_data); - if (pd->cmd != SSS_PAM_AUTHENTICATE && pd->cmd != SSS_PAM_CHAUTHTOK && - pd->cmd != SSS_PAM_CHAUTHTOK_PRELIM) { - DEBUG(4, ("krb5 does not handles pam task %d.\n", pd->cmd)); - pam_status = PAM_SUCCESS; - dp_err = DP_ERR_OK; - goto done; + switch (pd->cmd) { + case SSS_PAM_AUTHENTICATE: + case SSS_PAM_CHAUTHTOK: + case SSS_PAM_CHAUTHTOK_PRELIM: + break; + case SSS_PAM_ACCT_MGMT: + case SSS_PAM_SETCRED: + case SSS_PAM_OPEN_SESSION: + case SSS_PAM_CLOSE_SESSION: + pam_status = PAM_SUCCESS; + dp_err = DP_ERR_OK; + goto done; + break; + default: + DEBUG(4, ("krb5 does not handles pam task %d.\n", pd->cmd)); + pam_status = PAM_MODULE_UNKNOWN; + dp_err = DP_ERR_OK; + goto done; } if (be_is_offline(be_req->be_ctx) && |