[SSSD] [PATCH] LDAP: Fix off-by-one error when saving ghost user
Jakub Hrozek
jhrozek at redhat.com
Wed Oct 31 17:30:11 UTC 2012
https://fedorahosted.org/sssd/ticket/1612
-------------- next part --------------
>From de3c880f4c59ddddb24a5515f3ade0fedc49ebe9 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 31 Oct 2012 17:58:22 +0100
Subject: [PATCH] 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 saves as binary
attributes.
Related to:
https://fedorahosted.org/sssd/ticket/1612
---
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 60cbcea7727f5d7e614f339acf979e513b114efd..992678e98e27fdde9cf7de9755c9f31f64513731 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++;
}
}
--
1.7.12.1
More information about the sssd-devel
mailing list