From 92b7275fae0e4767c01edb094f0b1d7f8a7439ac Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Thu, 20 Sep 2012 14:00:27 +0200 Subject: SSSD fails to store users if any of the requested attribute is empty. https://fedorahosted.org/sssd/ticket/1440 --- src/providers/ldap/sdap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/providers/ldap') diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index c2dccb11d..01c6bcfd8 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -223,6 +223,12 @@ int sdap_parse_entry(TALLOC_CTX *memctx, goto fail; } for (i = 0; vals[i]; i++) { + if (vals[i]->bv_len == 0) { + DEBUG(SSSDBG_MINOR_FAILURE, + ("Value of attribute [%s] is empty. " + "Skipping this value.\n", str)); + continue; + } if (base64) { v.data = (uint8_t *)sss_base64_encode(attrs, (uint8_t *)vals[i]->bv_val, vals[i]->bv_len); -- cgit