1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

ctdb-common: Log a message for unknown conf option

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-08-31 08:32:12 +10:00 committed by Amitay Isaacs
parent 421d828f6c
commit ebb28c57a1
3 changed files with 8 additions and 0 deletions

View File

@ -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;
}

View File

@ -121,6 +121,7 @@ cat > "$conffile" <<EOF
EOF
required_result 2 <<EOF
conf: unknown option [section1] -> "foo"
[section1]
# key1 = value1
# key2 = 10

View File

@ -102,6 +102,7 @@ cat > "$conffile" <<EOF
EOF
required_result 2 <<EOF
conf: unknown option [database] -> "unknown key"
Failed to load config file $conffile
EOF
unit_test ctdb-config validate