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/responder/nss/nsssrv_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/responder/nss') diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 76b79ceb..12587ded 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -298,7 +298,7 @@ static int fill_pwent(struct sss_packet *packet, size_t dom_len = 0; int delim = 1; int i, ret, num, t; - bool add_domain = (dom->fqnames && (dom->parent == NULL)); + bool add_domain = (!IS_SUBDOMAIN(dom) && dom->fqnames); const char *domain = dom->name; const char *namefmt; bool packet_initialized = false; @@ -1903,7 +1903,7 @@ static int fill_members(struct sss_packet *packet, size_t blen; const char *domain = dom->name; - bool add_domain = (dom->fqnames && (dom->parent == NULL)); + bool add_domain = (!IS_SUBDOMAIN(dom) && dom->fqnames); if (add_domain) { delim = 1; @@ -2032,7 +2032,7 @@ static int fill_grent(struct sss_packet *packet, int i = 0; int ret, num, memnum; size_t rzero, rsize; - bool add_domain = (dom->fqnames && (dom->parent == NULL)); + bool add_domain = (!IS_SUBDOMAIN(dom) && dom->fqnames); const char *domain = dom->name; const char *namefmt; TALLOC_CTX *tmp_ctx = NULL; -- cgit