summaryrefslogtreecommitdiff
path: root/src/responder/autofs
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-14 17:04:00 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-02-10 22:08:47 +0100
commit0232747f04b650796db56fd7b487aee8a96fab03 (patch)
tree0c0329a59cbb66b1e4ea4983cd034dc9015245dc /src/responder/autofs
parent95e94691178297f2b8225a83d43ae388cab04b45 (diff)
downloadsssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.gz
sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.bz2
sssd-0232747f04b650796db56fd7b487aee8a96fab03.zip
Add function get_next_domain()
Use this function instead of explicitly calling domain->next This function allows to get the next primary domain or to descend into the subdomains and replaces also get_next_dom_or_subdom()
Diffstat (limited to 'src/responder/autofs')
-rw-r--r--src/responder/autofs/autofssrv_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/responder/autofs/autofssrv_cmd.c b/src/responder/autofs/autofssrv_cmd.c
index e1f3aeda..550c981a 100644
--- a/src/responder/autofs/autofssrv_cmd.c
+++ b/src/responder/autofs/autofssrv_cmd.c
@@ -627,7 +627,7 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
/* if it is a domainless search, skip domains that require fully
* qualified names instead */
while (dom && dctx->cmd_ctx->check_next && dom->fqnames) {
- dom = dom->next;
+ dom = get_next_domain(dom, false);
}
/* No domains left to search */
@@ -666,7 +666,7 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
if (!dctx->check_provider) {
if (dctx->cmd_ctx->check_next) {
DEBUG(SSSDBG_TRACE_INTERNAL, ("Moving on to next domain\n"));
- dom = dom->next;
+ dom = get_next_domain(dom, false);
continue;
}
else break;
@@ -873,8 +873,8 @@ static void lookup_automntmap_cache_updated(uint16_t err_maj, uint32_t err_min,
"Will try to return what we have in cache\n",
(unsigned int)err_maj, (unsigned int)err_min, err_msg));
/* Loop to the next domain if possible */
- if (dctx->domain->next && dctx->cmd_ctx->check_next) {
- dctx->domain = dctx->domain->next;
+ if (dctx->cmd_ctx->check_next && get_next_domain(dctx->domain, false)) {
+ dctx->domain = get_next_domain(dctx->domain, false);
dctx->check_provider = NEED_CHECK_PROVIDER(dctx->domain->provider);
}
}