diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-06-04 15:10:45 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-06-23 19:39:35 +0200 |
commit | a47cb2e08e4004179d2a6b5f9a9340200270fbd0 (patch) | |
tree | ca280530399b98f1a240ff4deaf33dad5c6cd99d /src/providers | |
parent | 6e973aa578a692b2e7597811dfdfdb1a442c85f8 (diff) | |
download | sssd-a47cb2e08e4004179d2a6b5f9a9340200270fbd0.tar.gz sssd-a47cb2e08e4004179d2a6b5f9a9340200270fbd0.tar.xz sssd-a47cb2e08e4004179d2a6b5f9a9340200270fbd0.zip |
nested groups: do not fail if we get one entry twice
https://fedorahosted.org/sssd/ticket/2341
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/sdap_async_nested_groups.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_async_nested_groups.c b/src/providers/ldap/sdap_async_nested_groups.c index 4ef3d79cb..040b836df 100644 --- a/src/providers/ldap/sdap_async_nested_groups.c +++ b/src/providers/ldap/sdap_async_nested_groups.c @@ -1257,8 +1257,9 @@ sdap_nested_group_single_step_process(struct tevent_req *subreq) /* save user in hash table */ ret = sdap_nested_group_hash_user(state->group_ctx, entry); if (ret == EEXIST) { - DEBUG(SSSDBG_TRACE_FUNC, "User was looked up twice, " - "this shouldn't have happened.\n"); + /* the user is already present, skip it */ + talloc_zfree(entry); + ret = EOK; goto done; } else if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Unable to save user in hash table " @@ -1299,8 +1300,9 @@ sdap_nested_group_single_step_process(struct tevent_req *subreq) /* save group in hash table */ ret = sdap_nested_group_hash_group(state->group_ctx, entry); if (ret == EEXIST) { - DEBUG(SSSDBG_TRACE_FUNC, "Group was looked up twice, " - "this shouldn't have happened.\n"); + /* the group is already present, skip it */ + talloc_zfree(entry); + ret = EOK; goto done; } else if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Unable to save group in hash table " |