diff options
author | Michal Zidek <mzidek@redhat.com> | 2016-06-15 17:05:01 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-07 10:25:03 +0200 |
commit | a68e17d8fdc265d40e6f4a7d21a6d287a4bf23d5 (patch) | |
tree | 3e9889c3f0e0ed35fe643e864a1d08ba87e3bda1 /src/providers/ldap | |
parent | 7cc19286547260350afed9ef7176712f8fc66652 (diff) | |
download | sssd-a68e17d8fdc265d40e6f4a7d21a6d287a4bf23d5.tar.gz sssd-a68e17d8fdc265d40e6f4a7d21a6d287a4bf23d5.tar.xz sssd-a68e17d8fdc265d40e6f4a7d21a6d287a4bf23d5.zip |
SDAP: Store SID members during AD initgroups with a qualified name
This is to be consistent with how we name groups normally. We rename the
groupnames when resolving the groups by ID anyway, but if we fail to do
so, at least be consistent.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/sdap_async_initgroups_ad.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c index 92cedb05f..ad54c1fb8 100644 --- a/src/providers/ldap/sdap_async_initgroups_ad.c +++ b/src/providers/ldap/sdap_async_initgroups_ad.c @@ -916,7 +916,12 @@ errno_t sdap_ad_save_group_membership_with_idmapping(const char *username, /* This is a new group. For now, we will store it under the name * of its SID. When a direct lookup of the group or its GID occurs, * it will replace this temporary entry. */ - name = sid; + name = sss_create_internal_fqname(tmp_ctx, sid, domain->name); + if (name == NULL) { + ret = ENOMEM; + goto done; + } + ret = sysdb_add_incomplete_group(domain, name, gid, NULL, sid, NULL, false, now); if (ret != EOK) { |