diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-11 05:06:48 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-17 14:27:16 -0400 |
commit | 50646763f907afc79dbaf40ddafc396b4c5931ec (patch) | |
tree | 5937d2908632aa34016afabb56053412dd7e034c /src/providers/ldap/ldap_id.c | |
parent | ec3ababc23f3d3732e57633c5325bdf2ed971882 (diff) | |
download | sssd-50646763f907afc79dbaf40ddafc396b4c5931ec.tar.gz sssd-50646763f907afc79dbaf40ddafc396b4c5931ec.tar.xz sssd-50646763f907afc79dbaf40ddafc396b4c5931ec.zip |
Ignore users and groups that lack mandatory attributes
https://fedorahosted.org/sssd/ticket/824
Diffstat (limited to 'src/providers/ldap/ldap_id.c')
-rw-r--r-- | src/providers/ldap/ldap_id.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c index 9a2342800..776df1ac2 100644 --- a/src/providers/ldap/ldap_id.c +++ b/src/providers/ldap/ldap_id.c @@ -335,9 +335,12 @@ struct tevent_req *groups_get_send(TALLOC_CTX *memctx, goto fail; } - state->filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))", - attr_name, clean_name, - ctx->opts->group_map[SDAP_OC_GROUP].name); + state->filter = + talloc_asprintf(state, "(&(%s=%s)(objectclass=%s)(%s=*)(%s=*))", + attr_name, clean_name, + 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); if (!state->filter) { DEBUG(2, ("Failed to build filter\n")); ret = ENOMEM; |