From: Martin Schwenke Date: Thu, 30 Aug 2018 22:32:12 +0000 (+1000) Subject: ctdb-common: Log a message for unknown conf option X-Git-Tag: tdb-1.3.17~1896 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebb28c57a17777ea15afab63cd0742dd79b30ffe;p=thirdparty%2Fsamba.git ctdb-common: Log a message for unknown conf option BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/common/conf.c b/ctdb/common/conf.c index a6e0f830328..cd1fa4acd2b 100644 --- a/ctdb/common/conf.c +++ b/ctdb/common/conf.c @@ -1113,8 +1113,14 @@ static bool conf_load_option(const char *name, opt = conf_option_find(state->s, name); if (opt == NULL) { if (state->conf->ignore_unknown) { + D_DEBUG("conf: unknown option [%s] -> \"%s\"\n", + state->s->name, + name); return true; } else { + D_ERR("conf: unknown option [%s] -> \"%s\"\n", + state->s->name, + name); state->err = ENOENT; return false; } diff --git a/ctdb/tests/cunit/conf_test_001.sh b/ctdb/tests/cunit/conf_test_001.sh index 08a51b00d9b..a1a84585b1e 100755 --- a/ctdb/tests/cunit/conf_test_001.sh +++ b/ctdb/tests/cunit/conf_test_001.sh @@ -121,6 +121,7 @@ cat > "$conffile" < "foo" [section1] # key1 = value1 # key2 = 10 diff --git a/ctdb/tests/cunit/config_test_001.sh b/ctdb/tests/cunit/config_test_001.sh index d5536bc7f2a..e58f710ac4d 100755 --- a/ctdb/tests/cunit/config_test_001.sh +++ b/ctdb/tests/cunit/config_test_001.sh @@ -102,6 +102,7 @@ cat > "$conffile" < "unknown key" Failed to load config file $conffile EOF unit_test ctdb-config validate