diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-27 16:02:33 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-30 13:29:30 +0100 |
commit | d18bd28fb09f104e2b13382c430247cad731f867 (patch) | |
tree | 9af34e684134060fb90602d5271bcb1708d98ea5 /src/providers/ldap/sdap_async_initgroups.c | |
parent | 8e0766215aef902eec24d880fbf2b30686c452e6 (diff) | |
download | sssd-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.c | 16 |
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; } |