From 13cdb0472b9ebfc2a079d72d80c0cf03778247f5 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 7 Jun 2010 17:21:25 +0200 Subject: Skip empty attributes with warning Fixes: #488 --- src/confdb/confdb_setup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit