diff options
Diffstat (limited to 'server/responder/pam/pamsrv_cache.c')
-rw-r--r-- | server/responder/pam/pamsrv_cache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/responder/pam/pamsrv_cache.c b/server/responder/pam/pamsrv_cache.c index 7cfd97b1..9c5c209f 100644 --- a/server/responder/pam/pamsrv_cache.c +++ b/server/responder/pam/pamsrv_cache.c @@ -132,6 +132,7 @@ done: int pam_cache_auth(struct pam_auth_req *preq) { + struct sysdb_ctx *sysdb; int ret; static const char *attrs[] = {SYSDB_NAME, @@ -144,7 +145,13 @@ int pam_cache_auth(struct pam_auth_req *preq) "lastFailedLogin", NULL}; - ret = sysdb_get_user_attr(preq, preq->cctx->rctx->sysdb, + ret = sysdb_get_ctx_from_list(preq->cctx->rctx->db_list, + preq->domain, &sysdb); + if (ret != EOK) { + DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n")); + return ret; + } + ret = sysdb_get_user_attr(preq, sysdb, preq->domain, preq->pd->user, attrs, pam_cache_auth_callback, preq); |