summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-15 22:19:36 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-02-10 22:08:47 +0100
commit4f118e3e6a25762f40a43e6dbefb09f44adbef32 (patch)
tree35e3eed19b3b462cc94f6aee0050562a7d37e6a8 /src/db
parentbfba0655bc129ebcffc20b1204e0f87549e0a74e (diff)
downloadsssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.tar.gz
sssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.tar.xz
sssd-4f118e3e6a25762f40a43e6dbefb09f44adbef32.zip
Introduce IS_SUBDOMAIN() macro
Fixes https://fedorahosted.org/sssd/ticket/1766
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb_search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 8ff29c37a..3226acc68 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);