summaryrefslogtreecommitdiff
path: root/src/responder
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-04-18 16:29:21 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-02 19:33:56 +0200
commit5a6e3cb57cf2d8d4118b58be0574cccea171ca19 (patch)
tree6890635741e4eb04a4b0a1e973ba00c43cea471f /src/responder
parent2648ec1017d37c0840294352b69fc87047da0368 (diff)
downloadsssd-5a6e3cb57cf2d8d4118b58be0574cccea171ca19.tar.gz
sssd-5a6e3cb57cf2d8d4118b58be0574cccea171ca19.tar.bz2
sssd-5a6e3cb57cf2d8d4118b58be0574cccea171ca19.zip
responder_get_domain(): remove timeout calculation
The current timout calculation code in responder_get_domain() is flawed and I think it always was. I removed the related code because - it currently has no effect, a match is returned even if it is expired - that callers do not have any code to handle expired domains.
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/responder_common.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 480b0461..008d622d 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -899,8 +899,6 @@ int sss_dp_get_domain_conn(struct resp_ctx *rctx, const char *domain,
struct sss_domain_info *
responder_get_domain(struct resp_ctx *rctx, const char *name)
{
- time_t now = time(NULL);
- time_t time_diff = 0;
struct sss_domain_info *dom;
struct sss_domain_info *ret_dom = NULL;
@@ -909,19 +907,12 @@ responder_get_domain(struct resp_ctx *rctx, const char *name)
continue;
}
- if (!IS_SUBDOMAIN(dom)) {
- time_diff = now - dom->subdomains_last_checked.tv_sec;
- }
if (strcasecmp(dom->name, name) == 0 ||
(dom->flat_name != NULL &&
strcasecmp(dom->flat_name, name) == 0)) {
ret_dom = dom;
- if (!IS_SUBDOMAIN(dom) ||
- (IS_SUBDOMAIN(dom) && time_diff < rctx->domains_timeout)) {
- break;
- }
+ break;
}
-
}
if (!ret_dom) {