summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2012-09-20 14:00:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-02-21 11:14:08 +0100
commit92b7275fae0e4767c01edb094f0b1d7f8a7439ac (patch)
tree52b82f8ec112adb0707faa32f304790d3d3740df
parent5b690b267aae663041fb42154d0be35d17ba9cba (diff)
downloadsssd-92b7275fae0e4767c01edb094f0b1d7f8a7439ac.tar.gz
sssd-92b7275fae0e4767c01edb094f0b1d7f8a7439ac.tar.xz
sssd-92b7275fae0e4767c01edb094f0b1d7f8a7439ac.zip
SSSD fails to store users if any of the requested attribute is empty.
https://fedorahosted.org/sssd/ticket/1440
-rw-r--r--src/providers/ldap/sdap.c6
1 files changed, 6 insertions, 0 deletions
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);