summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-31 17:58:22 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-01 11:06:00 +0100
commit843f1134d2a81de928ba4856f86cd9c64e8df40a (patch)
tree3f8378610d49d71cf0437836de01d9ac5f1ce894
parentf46bf56b98d056ba44b267f033e58149b44ea519 (diff)
downloadsssd-843f1134d2a81de928ba4856f86cd9c64e8df40a.tar.gz
sssd-843f1134d2a81de928ba4856f86cd9c64e8df40a.tar.bz2
sssd-843f1134d2a81de928ba4856f86cd9c64e8df40a.zip
LDAP: Fix off-by-one error when saving ghost users
The ldb_val's length parameter should not include the terminating NULL. This was causing funky behaviour as the users were saved as binary attributes. https://fedorahosted.org/sssd/ticket/1614
-rw-r--r--src/providers/ldap/sdap_async_groups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 60cbcea7..992678e9 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -406,7 +406,7 @@ static int sdap_save_group(TALLOC_CTX *memctx,
ret = ENOMEM;
goto fail;
}
- el->values[el->num_values].length = strlen(value.ptr)+1;
+ el->values[el->num_values].length = strlen(value.ptr);
el->num_values++;
}
}