in global config parsing, we currently expect to have a possible no keyword (KWN_NO), but we never allow it in config parsing. another patch could have been to simply remove the code handling a possible KWN_NO. take this opportunity to update documentation of set-dumpable. also make all strcmp conditions look the same in "no" parsing.
Signed-off-by: William Dauchy <[email protected]> --- doc/configuration.txt | 4 +++- src/cfgparse.c | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index a2bafcf40..d949f6bf4 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -1141,7 +1141,9 @@ setenv <name> <value> set-dumpable This option is better left disabled by default and enabled only upon a - developer's request. It has no impact on performance nor stability but will + developer's request. If it has been enabled, it may still be forcibly + disabled by prefixing it with the "no" keyword. It has no impact on + performance nor stability but will try hard to re-enable core dumps that were possibly disabled by file size limitations (ulimit -f), core size limitations (ulimit -c), or "dumpability" of a process after changing its UID/GID (such as /proc/sys/fs/suid_dumpable diff --git a/src/cfgparse.c b/src/cfgparse.c index a621b5d51..d2cea813b 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2147,9 +2147,12 @@ next_line: args[arg] = args[arg+1]; // shift args after inversion } - if (kwm != KWM_STD && strcmp(args[0], "option") != 0 && \ - strcmp(args[0], "log") != 0 && strcmp(args[0], "busy-polling")) { - ha_alert("parsing [%s:%d]: negation/default currently supported only for options, log, and busy-polling.\n", file, linenum); + if (kwm != KWM_STD && strcmp(args[0], "option") && + strcmp(args[0], "log") && strcmp(args[0], "busy-polling") && + strcmp(args[0], "set-dumpable")) { + ha_alert("parsing [%s:%d]: negation/default currently " + "supported only for options, log, busy-polling and " + "set-dumpable.\n", file, linenum); err_code |= ERR_ALERT | ERR_FATAL; } -- 2.23.0

