From 8ba75133979dee0b0890eeaca39bd0c33fd87b4e Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 31 Oct 2012 17:58:22 +0100 Subject: 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 --- src/providers/ldap/sdap_async_groups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 60cbcea77..992678e98 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++; } } -- cgit