diff options
author | Michal Zidek <mzidek@redhat.com> | 2012-09-20 14:00:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-21 11:14:08 +0100 |
commit | 92b7275fae0e4767c01edb094f0b1d7f8a7439ac (patch) | |
tree | 52b82f8ec112adb0707faa32f304790d3d3740df | |
parent | 5b690b267aae663041fb42154d0be35d17ba9cba (diff) | |
download | sssd-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.c | 6 |
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); |