diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-08-04 16:55:36 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-04 14:48:32 -0400 |
commit | 86d77907310fa939fe89884fbbdf2142c06a420e (patch) | |
tree | ed88d61576af4194ab24bdf735fe6b9fb564f3f8 /src/providers/ldap/ldap_id_enum.c | |
parent | 8b6801a0b180ef87118e8f071eb2eeea4607baf1 (diff) | |
download | sssd-86d77907310fa939fe89884fbbdf2142c06a420e.tar.gz sssd-86d77907310fa939fe89884fbbdf2142c06a420e.tar.bz2 sssd-86d77907310fa939fe89884fbbdf2142c06a420e.zip |
Fix returning groups when gidNumber attribute is not ordered
https://fedorahosted.org/sssd/ticket/951
Diffstat (limited to 'src/providers/ldap/ldap_id_enum.c')
-rw-r--r-- | src/providers/ldap/ldap_id_enum.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c index 68d113bf..40f3a2b6 100644 --- a/src/providers/ldap/ldap_id_enum.c +++ b/src/providers/ldap/ldap_id_enum.c @@ -573,10 +573,11 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx, if (ctx->srv_opts && ctx->srv_opts->max_group_value && !purge) { base_filter = talloc_asprintf( state, - "(&(objectclass=%s)(%s=*)(%s=*)(%s>=%s)(!(%s=%s)))", + "(&(objectclass=%s)(%s=*)(&(%s=*)(!(%s=0)))(%s>=%s)(!(%s=%s)))", ctx->opts->group_map[SDAP_OC_GROUP].name, ctx->opts->group_map[SDAP_AT_GROUP_NAME].name, ctx->opts->group_map[SDAP_AT_GROUP_GID].name, + ctx->opts->group_map[SDAP_AT_GROUP_GID].name, ctx->opts->group_map[SDAP_AT_GROUP_USN].name, ctx->srv_opts->max_group_value, ctx->opts->group_map[SDAP_AT_GROUP_USN].name, @@ -584,9 +585,10 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx, } else { base_filter = talloc_asprintf( state, - "(&(objectclass=%s)(%s=*)(%s=*))", + "(&(objectclass=%s)(%s=*)(&(%s=*)(!(%s=0))))", ctx->opts->group_map[SDAP_OC_GROUP].name, ctx->opts->group_map[SDAP_AT_GROUP_NAME].name, + ctx->opts->group_map[SDAP_AT_GROUP_GID].name, ctx->opts->group_map[SDAP_AT_GROUP_GID].name); } if (!base_filter) { |