sssd/0068-IPA-use-sysdb_attrs_add_string_safe-to-add-group-mem.patch

38 lines
1.6 KiB
Diff
Raw Normal View History

From 7752046aea558e4fbf057d4efc9aea1a61b1e009 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Fri, 3 Apr 2015 12:12:34 +0200
Subject: [PATCH 68/99] IPA: use sysdb_attrs_add_string_safe to add group
member
The member list returned by the extdom plugin might contain some entries
more than once. Although this is an issue on the server side to avoid
ldb errors duplicates should be filtered out on the client as well.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 625cff0b0938538e51fdd3b2d985e6082b492ea5)
---
src/providers/ipa/ipa_s2n_exop.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index b9de88984ea36d5010d5544258d7d0cc68bfa669..688fdefe8eefe29a0cd13010bb3998527f3111f4 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -1300,10 +1300,11 @@ static errno_t process_members(struct sss_domain_info *domain,
DEBUG(SSSDBG_TRACE_ALL, "Adding member [%s][%s]\n",
members[c], dn_str);
- ret = sysdb_attrs_add_string(group_attrs, SYSDB_MEMBER, dn_str);
+ ret = sysdb_attrs_add_string_safe(group_attrs, SYSDB_MEMBER,
+ dn_str);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- "sysdb_attrs_add_string failed.\n");
+ "sysdb_attrs_add_string_safe failed.\n");
goto done;
}
}
--
2.4.0