diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-04-04 12:24:45 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-04-07 14:27:18 -0400 |
commit | 1e13ce7e631f8e5ab0de0b5d1abaa6496259a552 (patch) | |
tree | 6955be6db8e005c2cc906617f5b3e0c39a4909ba /server | |
parent | ee762f9b709224a7dc7460fc535ee992045168b8 (diff) | |
download | sssd-1e13ce7e631f8e5ab0de0b5d1abaa6496259a552.tar.gz sssd-1e13ce7e631f8e5ab0de0b5d1abaa6496259a552.tar.xz sssd-1e13ce7e631f8e5ab0de0b5d1abaa6496259a552.zip |
Use info in the domain entry to determine action.
This way LOCAL domains backed by files works as expected too.
Tested with nss_files + pam_unix
Diffstat (limited to 'server')
-rw-r--r-- | server/responder/pam/pamsrv_cmd.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index 06a230b65..69f198c62 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -194,6 +194,7 @@ done: static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) { + struct sss_domain_info *info; uint8_t *body; size_t blen; int ret; @@ -229,7 +230,17 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) DEBUG(4, ("Using default domain [%s].\n", pd->domain)); } - if ( strncasecmp(pd->domain,"LOCAL",5) == 0 ) { + if (pd->domain) { + /* Check for registered domain */ + info = btreemap_get_value(cctx->rctx->domain_map, + (void *)(pd->domain)); + if (!info) { + talloc_free(pd); + return EINVAL; + } + } + + if (!info->provider) { return LOCAL_pam_handler(cctx, pam_reply, pd); }; |