diff options
author | Sumit Bose <sbose@redhat.com> | 2013-04-18 16:29:21 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-02 19:33:56 +0200 |
commit | 5a6e3cb57cf2d8d4118b58be0574cccea171ca19 (patch) | |
tree | 6890635741e4eb04a4b0a1e973ba00c43cea471f | |
parent | 2648ec1017d37c0840294352b69fc87047da0368 (diff) | |
download | sssd-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.
-rw-r--r-- | src/responder/common/responder_common.c | 11 |
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) { |