summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_groups.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-01-06 16:04:32 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-09 17:48:54 +0100
commitf8f2ec0b4097bef628e66919acb746fe0ef6f6c2 (patch)
treeb5baf93e3a8c506ea8d4a6bbcd12096873df0191 /src/providers/ldap/sdap_async_groups.c
parent6e1c8bf0caadcd6749b142d8b0322bf320a48e7d (diff)
downloadsssd-f8f2ec0b4097bef628e66919acb746fe0ef6f6c2.tar.gz
sssd-f8f2ec0b4097bef628e66919acb746fe0ef6f6c2.tar.xz
sssd-f8f2ec0b4097bef628e66919acb746fe0ef6f6c2.zip
AD: replace GID/UID, do not add another one
The code would call sysdb_attrs_add_uint32 which added another UID or GID to the ID=0 we already downloaded from LDAP (0 is the default value) when ID-mapping an entry. This led to funky behaviour later on when we wanted to process the ID.
Diffstat (limited to 'src/providers/ldap/sdap_async_groups.c')
-rw-r--r--src/providers/ldap/sdap_async_groups.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 930d7fd82..05aaf93d8 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -398,11 +398,9 @@ static int sdap_save_group(TALLOC_CTX *memctx,
/* 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) {
- DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not store GID: [%s]\n",
- strerror(ret)));
+ ret = sdap_replace_id(attrs, SYSDB_GIDNUM, gid);
+ if (ret) {
+ DEBUG(SSSDBG_OP_FAILURE, ("Cannot set the id-mapped GID\n"));
goto done;
}
} else {