diff options
Diffstat (limited to 'src/providers/ldap/sdap_async_users.c')
-rw-r--r-- | src/providers/ldap/sdap_async_users.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c index f640b970..ade1d37b 100644 --- a/src/providers/ldap/sdap_async_users.c +++ b/src/providers/ldap/sdap_async_users.c @@ -160,8 +160,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 done; + ret = sdap_replace_id(attrs, SYSDB_UIDNUM, uid); + if (ret) { + DEBUG(SSSDBG_OP_FAILURE, ("Cannot set the id-mapped UID\n")); + goto done; + } } else { ret = sysdb_attrs_get_uint32_t(attrs, opts->user_map[SDAP_AT_USER_UID].sys_name, |