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/db/sysdb_search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/db') diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c index 8ff29c37..3226acc6 100644 --- a/src/db/sysdb_search.c +++ b/src/db/sysdb_search.c @@ -55,7 +55,7 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx, /* If this is a subomain we need to use fully qualified names for the * search as well by default */ - if (domain->parent && domain->fqnames) { + if (IS_SUBDOMAIN(domain) && domain->fqnames) { ret = ENOMEM; src_name = talloc_asprintf(tmp_ctx, domain->names->fq_fmt, name, domain->name); @@ -243,7 +243,7 @@ int sysdb_getgrnam(TALLOC_CTX *mem_ctx, /* If this is a subomain we need to use fully qualified names for the * search as well by default */ - if (domain->parent && domain->fqnames) { + if (IS_SUBDOMAIN(domain) && domain->fqnames) { ret = ENOMEM; src_name = talloc_asprintf(tmp_ctx, domain->names->fq_fmt, name, domain->name); -- cgit