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 13:29:30 +0100
commitd18bd28fb09f104e2b13382c430247cad731f867 (patch)
tree9af34e684134060fb90602d5271bcb1708d98ea5 /src/providers/ldap/sdap_async_initgroups.c
parent8e0766215aef902eec24d880fbf2b30686c452e6 (diff)
downloadsssd-d18bd28fb09f104e2b13382c430247cad731f867.tar.gz
sssd-d18bd28fb09f104e2b13382c430247cad731f867.tar.xz
sssd-d18bd28fb09f104e2b13382c430247cad731f867.zip
LDAP: Add UUID when saving incomplete groups
Related to: https://fedorahosted.org/sssd/ticket/2571 Reviewed-by: Sumit Bose <sbose@redhat.com> (cherry picked from commit 108db0e3b9e06e530364ef8228634f5e3f6bd3b5)
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;
}