diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-15 22:19:36 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-10 22:08:47 +0100 |
commit | 4f118e3e6a25762f40a43e6dbefb09f44adbef32 (patch) | |
tree | 35e3eed19b3b462cc94f6aee0050562a7d37e6a8 /src/responder/nss | |
parent | bfba0655bc129ebcffc20b1204e0f87549e0a74e (diff) | |
download | sssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.tar.gz sssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.tar.bz2 sssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.zip |
Introduce IS_SUBDOMAIN() macro
Fixes https://fedorahosted.org/sssd/ticket/1766
Diffstat (limited to 'src/responder/nss')
-rw-r--r-- | src/responder/nss/nsssrv_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |