summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-01-27 16:02:33 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-30 12:40:50 +0100
commit108db0e3b9e06e530364ef8228634f5e3f6bd3b5 (patch)
tree9fd0b05e9b534995c36d25d46661df188c4f91c1 /src/providers/ldap/sdap_async_initgroups.c
parent2c7a47b6ed9c9dc721af1eac6c53b706bf1769b6 (diff)
downloadsssd-108db0e3b9e06e530364ef8228634f5e3f6bd3b5.tar.gz
sssd-108db0e3b9e06e530364ef8228634f5e3f6bd3b5.tar.xz
sssd-108db0e3b9e06e530364ef8228634f5e3f6bd3b5.zip
LDAP: Add UUID when saving incomplete groups
Related to: https://fedorahosted.org/sssd/ticket/2571 Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_initgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index d3e080013..6b3179d2d 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -41,6 +41,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb,
int i, mi, ai;
const char *groupname;
const char *original_dn;
+ const char *uuid = NULL;
char **missing;
gid_t gid;
int ret;
@@ -191,15 +192,24 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb,
&original_dn);
if (ret) {
DEBUG(SSSDBG_FUNC_DATA,
- "The group has no name original DN\n");
+ "The group has no original DN\n");
original_dn = NULL;
}
+ ret = sysdb_attrs_get_string(ldap_groups[ai],
+ SYSDB_UUID,
+ &uuid);
+ if (ret) {
+ DEBUG(SSSDBG_FUNC_DATA,
+ "The group has no UUID\n");
+ uuid = NULL;
+ }
+
DEBUG(SSSDBG_TRACE_INTERNAL,
"Adding fake group %s to sysdb\n", groupname);
ret = sysdb_add_incomplete_group(domain, groupname, gid,
- original_dn, sid_str, posix,
- now);
+ original_dn, sid_str,
+ uuid, posix, now);
if (ret != EOK) {
goto done;
}