summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2012-09-20 14:00:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-20 19:48:07 +0200
commitbb918975adc4dc26d22578f174027c0d7a1e3ed9 (patch)
tree49bb19c57962b7477eba00687c3bbbe54a7ddeb8
parentc75bde967be301ba58cfa376778f5cd9daa991f5 (diff)
downloadsssd-bb918975adc4dc26d22578f174027c0d7a1e3ed9.tar.gz
sssd-bb918975adc4dc26d22578f174027c0d7a1e3ed9.tar.bz2
sssd-bb918975adc4dc26d22578f174027c0d7a1e3ed9.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 65fbc8c1..11ba9cf3 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -252,6 +252,12 @@ int sdap_parse_entry(TALLOC_CTX *memctx,
goto done;
}
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);