>From 6ed6a649997648412d9266672e50575166106e92 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 11 Mar 2014 17:37:47 +0100 Subject: [PATCH 1/2] LDAP: Do not attempt to find the GID if the group was already filtered out If the check for AD groups already indicated that the group should be filtered out, we shouldn't bother checking the GID. The check might fail for ID mapped groups which would trigger a confusing DEBUG message. --- src/providers/ldap/sdap_async_nested_groups.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/providers/ldap/sdap_async_nested_groups.c b/src/providers/ldap/sdap_async_nested_groups.c index 51e88bbfb2d9bc8a7a77737baafb2b3b8b886e95..efbf4080e6ae8e55566c4d68b701b08ff6429ec0 100644 --- a/src/providers/ldap/sdap_async_nested_groups.c +++ b/src/providers/ldap/sdap_async_nested_groups.c @@ -265,9 +265,11 @@ sdap_nested_group_hash_group(struct sdap_nested_group_ctx *group_ctx, } } - ret = sysdb_attrs_get_uint32_t(group, map[SDAP_AT_GROUP_GID].sys_name, - &gid); - if (ret == ENOENT || (ret == EOK && gid == 0) || !posix_group) { + if (posix_group) { + ret = sysdb_attrs_get_uint32_t(group, map[SDAP_AT_GROUP_GID].sys_name, + &gid); + } + if (!posix_group || ret == ENOENT || (ret == EOK && gid == 0)) { DEBUG(SSSDBG_TRACE_ALL, "The group's gid was %s\n", ret == ENOENT ? "missing" : "zero"); DEBUG(SSSDBG_TRACE_INTERNAL, -- 1.8.5.3