summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2015-04-03 12:12:34 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-04-27 15:45:54 +0200
commit7752046aea558e4fbf057d4efc9aea1a61b1e009 (patch)
tree11f1c1b3f4b4d045f036a4169a800100738455db
parent3453e4734d2f7738034af61edb7d33c0c7095d8a (diff)
downloadsssd-7752046aea558e4fbf057d4efc9aea1a61b1e009.tar.gz
sssd-7752046aea558e4fbf057d4efc9aea1a61b1e009.tar.xz
sssd-7752046aea558e4fbf057d4efc9aea1a61b1e009.zip
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)
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index b9de88984..688fdefe8 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;
}
}