diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-04-23 08:58:54 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-03 14:09:14 -0400 |
commit | 3f2fa4c9290afdb393c760419a0ff686045a1ab3 (patch) | |
tree | a392008cb3a569dc0e4531c743d5296dbf1412c4 /src/providers/ldap/sdap_async_users.c | |
parent | 58d02e0d3d6d48c97fccdb2ad7212e065671ad6d (diff) | |
download | sssd-3f2fa4c9290afdb393c760419a0ff686045a1ab3.tar.gz sssd-3f2fa4c9290afdb393c760419a0ff686045a1ab3.tar.bz2 sssd-3f2fa4c9290afdb393c760419a0ff686045a1ab3.zip |
LDAP: Do not remove uidNumber and gidNumber attributes when saving id-mapped entries
Diffstat (limited to 'src/providers/ldap/sdap_async_users.c')
-rw-r--r-- | src/providers/ldap/sdap_async_users.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c index c894e874..11574f9e 100644 --- a/src/providers/ldap/sdap_async_users.c +++ b/src/providers/ldap/sdap_async_users.c @@ -179,6 +179,11 @@ int sdap_save_user(TALLOC_CTX *memctx, } } + /* Store the UID in the ldap_attrs so it doesn't get + * treated as a missing attribute from LDAP and removed. + */ + ret = sysdb_attrs_add_uint32(attrs, SYSDB_UIDNUM, uid); + if (ret != EOK) goto fail; } else { ret = sysdb_attrs_get_uint32_t(attrs, opts->user_map[SDAP_AT_USER_UID].sys_name, @@ -247,6 +252,12 @@ int sdap_save_user(TALLOC_CTX *memctx, ret = EIO; goto fail; } + + /* Store the GID in the ldap_attrs so it doesn't get + * treated as a missing attribute from LDAP and removed. + */ + ret = sysdb_attrs_add_uint32(attrs, SYSDB_GIDNUM, gid); + if (ret != EOK) goto fail; } else { ret = sysdb_attrs_get_uint32_t(attrs, opts->user_map[SDAP_AT_USER_GID].sys_name, |