diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-14 17:04:00 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-10 22:08:47 +0100 |
commit | 0232747f04b650796db56fd7b487aee8a96fab03 (patch) | |
tree | 0c0329a59cbb66b1e4ea4983cd034dc9015245dc /src/util/usertools.c | |
parent | 95e94691178297f2b8225a83d43ae388cab04b45 (diff) | |
download | sssd-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/util/usertools.c')
-rw-r--r-- | src/util/usertools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/usertools.c b/src/util/usertools.c index 0a657a182..33a2a7bd5 100644 --- a/src/util/usertools.c +++ b/src/util/usertools.c @@ -339,7 +339,7 @@ int sss_parse_name_for_domains(TALLOC_CTX *memctx, rname = NULL; rdomain = NULL; - for (dom = domains; dom != NULL; dom = dom->next) { + for (dom = domains; dom != NULL; dom = get_next_domain(dom, false)) { ret = sss_parse_name(tmp_ctx, dom->names, orig, &dmatch, &nmatch); if (ret == EOK) { /* @@ -397,7 +397,7 @@ int sss_parse_name_for_domains(TALLOC_CTX *memctx, goto done; } - for (dom = domains; dom != NULL; dom = dom->next) { + for (dom = domains; dom != NULL; dom = get_next_domain(dom, false)) { match = match_any_domain_or_subdomain_name(dom, rdomain); if (match != NULL) { break; |