summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-31 17:58:22 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-06 21:23:09 +0100
commit8ba75133979dee0b0890eeaca39bd0c33fd87b4e (patch)
tree6db165cf9ef0617c71dfbcbcd82390833ce429a1 /src/providers/ldap
parente9d8563c0c715dde27325583a1e3c8cf234c6357 (diff)
downloadsssd-8ba75133979dee0b0890eeaca39bd0c33fd87b4e.tar.gz
sssd-8ba75133979dee0b0890eeaca39bd0c33fd87b4e.tar.xz
sssd-8ba75133979dee0b0890eeaca39bd0c33fd87b4e.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
Diffstat (limited to 'src/providers/ldap')
-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 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++;
}
}