diff --git a/src/daemon.c b/src/daemon.c index 91403ef..ed8e69c 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -280,9 +280,9 @@ int main(int argc, char *argv[]) { if (appconfig.nice != 0) { errno = 0; - nice(appconfig.nice); - if (errno) + if (nice(appconfig.nice) == -1 && errno) { f2b_log_msg(log_warn, "can't set process priority: %s", strerror(errno)); + } } if (appconfig.coredumps) { diff --git a/src/jail.c b/src/jail.c index 44556ff..48ac4ee 100644 --- a/src/jail.c +++ b/src/jail.c @@ -150,6 +150,7 @@ f2b_jail_set_defaults(f2b_config_section_t *section) { assert(section != NULL); assert(section->type == t_defaults); + strlcpy(defaults.name, "default", sizeof(defaults.name)); /* can't init before */ f2b_jail_apply_config(&defaults, section); return;