[SSSD] [PATCH] sysdb: try dealing with binary-content attributes
Jakub Hrozek
jhrozek at redhat.com
Tue Feb 26 15:50:55 UTC 2013
On Mon, Feb 25, 2013 at 12:29:36PM +0100, Jan Engelhardt wrote:
> I have here a LDAP user entry which has this attribute
>
> loginAllowedTimeMap::
> AAAAAAAAAP///38AAP///38AAP///38AAP///38AAP///38AAAAAAAAA
>
> In the function sysdb_attrs_add_string(), called from
> sdap_attrs_add_ldap_attr(), strlen() is called on this blob, which is
> the wrong thing to do. The result of strlen is then used to populate
> the .v_length member of a struct ldb_val - and this will set it to
> zero in this case. (There is also the problem that there may not be
> a '\0' at all in the blob.)
>
> Subsequently, .v_length being 0 makes ldb_modify(), called from
> sysdb_set_entry_attr(), return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX. End
> result is that users do not get stored in the sysdb, and programs like
> `id` or `getent ...` show incomplete information.
>
> As far as involved people and I have observed, the problem is not
> present in sssd-1.5.11. AFAICS, on a source level, sssd-1.5.11 does
> not have the "sdap_attrs_add_ldap_attr" function, so that may explain
> things, and the problem might in fact be classified as regression.
Ack, but I will also squash in the attached one-liner.
-------------- next part --------------
>From a791e70a94d3bbeddba45f66e14ddd705448efdf Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Tue, 26 Feb 2013 16:50:28 +0100
Subject: [PATCH] Remove unused variable
---
src/providers/ldap/sdap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 988f27dbb8c8ba3c3779ab9f0069b82b6f2495b0..dba4e41db0039632939f275f9295321afe7a31ae 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -343,7 +343,6 @@ errno_t sdap_parse_deref(TALLOC_CTX *mem_ctx,
const char **ocs;
struct sdap_attr_map *map;
int num_attrs;
- struct ldb_val v;
int ret, i, a, mi;
const char *name;
size_t len;
--
1.8.1.2
More information about the sssd-devel
mailing list