summaryrefslogtreecommitdiffstats
path: root/src/confdb
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-06-07 17:21:25 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-06-09 08:29:34 -0400
commit13cdb0472b9ebfc2a079d72d80c0cf03778247f5 (patch)
treefd5fb1f21cb4047dd32decaa50666fc5ffa23b71 /src/confdb
parentcede23a29ded52c2ea265fad8d7069d56bf7e87c (diff)
downloadsssd-13cdb0472b9ebfc2a079d72d80c0cf03778247f5.tar.gz
sssd-13cdb0472b9ebfc2a079d72d80c0cf03778247f5.tar.xz
sssd-13cdb0472b9ebfc2a079d72d80c0cf03778247f5.zip
Skip empty attributes with warning
Fixes: #488
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb_setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/confdb/confdb_setup.c b/src/confdb/confdb_setup.c
index 1e9200e52..b2ac7e163 100644
--- a/src/confdb/confdb_setup.c
+++ b/src/confdb/confdb_setup.c
@@ -203,6 +203,10 @@ static int confdb_create_ldif(TALLOC_CTX *mem_ctx,
const char *value = get_const_string_config_value(attr, &ret);
if (ret != EOK) goto error;
+ if (value && value[0] == '\0') {
+ DEBUG(1, ("Attribute '%s' has empty value, ignoring\n", attrs[j]));
+ continue;
+ }
ldif_attr = talloc_asprintf(tmp_ctx,
"%s: %s\n", attrs[j], value);