• Luiz Angelo Daros de Luca's avatar
    saned: reorganize flags, remove run_mode SANED_RUN_DEBUG · 5288dd5f
    Luiz Angelo Daros de Luca authored
    Flags like -a, -d and -s have many overlap effects. This patch restricts
    the effect of flags to a simple action.
    New -u (user) flag replaces -a optional argument for running saned as a different user.
    The code that retrieve the user info and drop privileges migrated to runas_user().
    As a side effect, PID file can be created even if getting user info fails.
    New -l (listen) flag sets run_mode to standalone.
    New -D (daemonize) flag daemonizes saned after bind.
    New -o (once) make saned exit after the first client disconnects.
    Flag -s (syslog) is gone. Previous behavior can be reproduced with '-a -d level -o -f'.
    New -e (stderr) flag for redirecting output to stderr, instead of syslog.
    Flag -d (debug) now only sets the debug level and argument is required. Previous behavior
    can be reproduced with '-a -d level -o -f -e'.
    The run_mode SANED_RUN_DEBUG and SANED_RUN_ALONE shared most of its code
    path. With the new flags dealing with their difference, SANED_RUN_DEBUG is gone.
    Flag '-a' still works as before but it can be replaced by '-l -D -u user'.
    Current uses of -d (debug) or -s (syslog) will break.
    Signed-off-by: Luiz Angelo Daros de Luca's avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
To find the state of this project's repository at the time of any of these versions, check out the tags.
NEWS 46.2 KB