diff options
author | Sumit Bose <sbose@redhat.com> | 2009-06-04 13:38:45 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-06-08 10:23:56 -0400 |
commit | eb9219600d93bd3b88b0d4c8c3052a77f0c2fdd5 (patch) | |
tree | 3a6d2cfe2c1124ea47ede62b19b02dabb54c34e7 /server/responder/pam | |
parent | 345d12eea27b7cb0c42c5f110878bf040f3bcc2c (diff) | |
download | sssd-eb9219600d93bd3b88b0d4c8c3052a77f0c2fdd5.tar.gz sssd-eb9219600d93bd3b88b0d4c8c3052a77f0c2fdd5.tar.bz2 sssd-eb9219600d93bd3b88b0d4c8c3052a77f0c2fdd5.zip |
fix detection of authentication against LOCAL domain
Diffstat (limited to 'server/responder/pam')
-rw-r--r-- | server/responder/pam/pamsrv_cmd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index 1df947ad..e0654908 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -462,10 +462,16 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) preq->domain = dom; } + if (preq->domain->provider == NULL) { + DEBUG(1, ("Domain [%s] has no auth provider.\n", preq->domain->name)); + ret = EINVAL; + goto done; + } + /* When auth is requested always search the provider first, * do not rely on cached data unless the provider is completely * offline */ - if (preq->domain->provider && + if (NEED_CHECK_PROVIDER(preq->domain->provider) && (pam_cmd == SSS_PAM_AUTHENTICATE || pam_cmd == SSS_PAM_SETCRED)) { /* no need to re-check later on */ @@ -650,7 +656,7 @@ static void pam_check_user_callback(void *ptr, int status, /* When auth is requested always search the provider first, * do not rely on cached data unless the provider is * completely offline */ - if (preq->domain->provider && + if (NEED_CHECK_PROVIDER(preq->domain->provider) && (preq->pd->cmd == SSS_PAM_AUTHENTICATE || preq->pd->cmd == SSS_PAM_SETCRED)) { @@ -728,7 +734,7 @@ static void pam_dom_forwarder(struct pam_auth_req *preq) preq->pd->domain = preq->domain->name; } - if (!preq->domain->provider) { + if (!NEED_CHECK_PROVIDER(preq->domain->provider)) { preq->callback = pam_reply; ret = LOCAL_pam_handler(preq); } |