summaryrefslogtreecommitdiffstats
path: root/src/responder/pam/pamsrv.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-12-22 11:00:22 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-12-22 13:22:28 -0500
commitc71ff1e4615ec8560b90ca7d4827d99424ad0355 (patch)
tree5f1ccd75d8e6dfcb9d5a3898ebc9368dabcca261 /src/responder/pam/pamsrv.c
parent7da6ae5558059218d660d879057f6e39864c3493 (diff)
downloadsssd-c71ff1e4615ec8560b90ca7d4827d99424ad0355.tar.gz
sssd-c71ff1e4615ec8560b90ca7d4827d99424ad0355.tar.xz
sssd-c71ff1e4615ec8560b90ca7d4827d99424ad0355.zip
Update the ID cache for any PAM request
Also adds an option to limit how often we check the ID provider, so that conversations with multiple PAM requests won't update the cache multiple times. https://fedorahosted.org/sssd/ticket/749
Diffstat (limited to 'src/responder/pam/pamsrv.c')
-rw-r--r--src/responder/pam/pamsrv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c
index 61e7ce7a3..91ee4a899 100644
--- a/src/responder/pam/pamsrv.c
+++ b/src/responder/pam/pamsrv.c
@@ -108,6 +108,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
struct be_conn *iter;
struct pam_ctx *pctx;
int ret, max_retries;
+ int id_timeout;
pctx = talloc_zero(mem_ctx, struct pam_ctx);
if (!pctx) {
@@ -153,6 +154,14 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
&pctx->neg_timeout);
if (ret != EOK) goto done;
+ /* Set up the PAM identity timeout */
+ ret = confdb_get_int(cdb, pctx, CONFDB_PAM_CONF_ENTRY,
+ CONFDB_PAM_ID_TIMEOUT, 5,
+ &id_timeout);
+ if (ret != EOK) goto done;
+
+ pctx->id_timeout = (size_t)id_timeout;
+
ret = sss_ncache_init(pctx, &pctx->ncache);
if (ret != EOK) {
DEBUG(0, ("fatal error initializing negative cache\n"));