From 4f118e3e6a25762f40a43e6dbefb09f44adbef32 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 15 Jan 2013 22:19:36 -0500 Subject: Introduce IS_SUBDOMAIN() macro Fixes https://fedorahosted.org/sssd/ticket/1766 --- src/providers/ipa/ipa_subdomains.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/providers/ipa/ipa_subdomains.c') diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index deee153b..28811ae7 100644 --- a/src/providers/ipa/ipa_subdomains.c +++ b/src/providers/ipa/ipa_subdomains.c @@ -301,7 +301,7 @@ ipa_subdomains_write_mappings(struct sss_domain_info *domain) } for (dom = get_next_domain(domain, true); - dom && dom->parent; /* if we get back to a parent, stop */ + dom && IS_SUBDOMAIN(dom); /* if we get back to a parent, stop */ dom = get_next_domain(dom, false)) { ret = fprintf(fstream, ".%s = %s\n%s = %s\n", dom->name, dom->realm, dom->name, dom->realm); @@ -379,7 +379,7 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx, /* check existing subdomains */ for (dom = get_next_domain(domain, true); - dom && dom->parent; + dom && IS_SUBDOMAIN(dom); /* if we get back to a parent, stop */ dom = get_next_domain(dom, false)) { for (c = 0; c < count; c++) { if (handled[c]) { -- cgit