summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo
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/sudo
parent95e94691178297f2b8225a83d43ae388cab04b45 (diff)
downloadsssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.gz
sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.xz
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/sudo')
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index 8d7480bec..90481ed9c 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -108,7 +108,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* if it is a domainless search, skip domains that require fully
* qualified names instead */
while (dom && cmd_ctx->check_next && dom->fqnames) {
- dom = dom->next;
+ dom = get_next_domain(dom, false);
}
if (!dom) break;
@@ -155,7 +155,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* if a multidomain search, try with next */
if (cmd_ctx->check_next) {
dctx->check_provider = true;
- dom = dom->next;
+ dom = get_next_domain(dom, false);
if (dom) continue;
}
@@ -209,7 +209,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* if a multidomain search, try with next */
if (cmd_ctx->check_next) {
dctx->check_provider = true;
- dom = dom->next;
+ dom = get_next_domain(dom, false);
if (dom) continue;
}