summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/sss_sync_ops.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 39ef5bec9..a0291baea 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -137,6 +137,7 @@ static int mod_groups_member(struct sss_domain_info *dom,
struct ldb_dn *parent_dn;
int ret;
int i;
+ char *grp_sysdb_fqname = NULL;
tmpctx = talloc_new(NULL);
if (!tmpctx) {
@@ -145,13 +146,21 @@ static int mod_groups_member(struct sss_domain_info *dom,
/* FIXME: add transaction around loop */
for (i = 0; grouplist[i]; i++) {
+ grp_sysdb_fqname = sss_create_internal_fqname(tmpctx, grouplist[i],
+ dom->name);
+ if (grp_sysdb_fqname == NULL) {
+ ret = ENOMEM;
+ goto done;
+ }
- parent_dn = sysdb_group_dn(tmpctx, dom, grouplist[i]);
+ parent_dn = sysdb_group_dn(tmpctx, dom, grp_sysdb_fqname);
if (!parent_dn) {
ret = ENOMEM;
goto done;
}
+ talloc_free(grp_sysdb_fqname);
+
ret = sysdb_mod_group_member(dom, member_dn, parent_dn, optype);
if (ret) {
goto done;