summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-04-04 12:24:45 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-07 14:27:18 -0400
commit1e13ce7e631f8e5ab0de0b5d1abaa6496259a552 (patch)
tree6955be6db8e005c2cc906617f5b3e0c39a4909ba
parentee762f9b709224a7dc7460fc535ee992045168b8 (diff)
downloadsssd-1e13ce7e631f8e5ab0de0b5d1abaa6496259a552.tar.gz
sssd-1e13ce7e631f8e5ab0de0b5d1abaa6496259a552.tar.bz2
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
-rw-r--r--server/responder/pam/pamsrv_cmd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 06a230b6..69f198c6 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);
};