summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_groups.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 3c3a954e4..858c8c90c 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -344,7 +344,8 @@ static int sdap_save_group(TALLOC_CTX *memctx,
}
}
- ret = sysdb_attrs_get_el(attrs, opts->group_map[SDAP_AT_GROUP_MEMBER].sys_name, &el1);
+ ret = sysdb_attrs_get_el(attrs, opts->group_map[SDAP_AT_GROUP_MEMBER].sys_name,
+ &el1);
if (ret != EOK) {
goto fail;
}
@@ -356,13 +357,21 @@ static int sdap_save_group(TALLOC_CTX *memctx,
}
el->values = el1->values;
el->num_values = el1->num_values;
-
}
ret = sysdb_attrs_get_el(attrs, SYSDB_GHOST, &gh);
if (ret != EOK) {
goto fail;
}
+ if (gh->num_values == 0) {
+ ret = sysdb_attrs_get_el(attrs,
+ opts->group_map[SDAP_AT_GROUP_MEMBER].sys_name,
+ &el1);
+ if (ret != EOK) {
+ goto fail;
+ }
+ }
+
ret = sysdb_attrs_get_el(group_attrs, SYSDB_GHOST, &el);
if (ret != EOK) {
goto fail;