summaryrefslogtreecommitdiff
path: root/server/responder/pam
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-05-26 18:04:42 +0200
committerSimo Sorce <ssorce@redhat.com>2009-05-26 14:04:31 -0400
commita19669c6c3bd52a86c4c52404f5df78db40495e1 (patch)
treef5392471b1d8cbcd2f004c98bcac0d1403c5fbdc /server/responder/pam
parenta2ef77536db67b315ca44b067613979a515ab134 (diff)
downloadsssd-a19669c6c3bd52a86c4c52404f5df78db40495e1.tar.gz
sssd-a19669c6c3bd52a86c4c52404f5df78db40495e1.tar.bz2
sssd-a19669c6c3bd52a86c4c52404f5df78db40495e1.zip
fix a wrong timeout
The timeout of the data provider call (in ms) got overwritten by a cache timeout (in s).
Diffstat (limited to 'server/responder/pam')
-rw-r--r--server/responder/pam/pamsrv_cmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 40cccffb..2494e100 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -543,7 +543,8 @@ static void pam_check_user_callback(void *ptr, int status,
struct sss_domain_info *dom;
uint64_t lastUpdate;
bool call_provider = false;
- int timeout;
+ time_t timeout;
+ time_t cache_timeout;
int ret;
if (status != LDB_SUCCESS) {
@@ -561,11 +562,11 @@ static void pam_check_user_callback(void *ptr, int status,
break;
case 1:
- timeout = 30; /* FIXME: read from conf */
+ cache_timeout = 30; /* FIXME: read from conf */
lastUpdate = ldb_msg_find_attr_as_uint64(res->msgs[0],
SYSDB_LAST_UPDATE, 0);
- if (lastUpdate + timeout < time(NULL)) {
+ if (lastUpdate + cache_timeout < time(NULL)) {
call_provider = true;
}
break;