conf: do not warn about missing user directive unless root

there's no point in printing a warning if the program is already started
as a restricted user.
master
rofl0r 2021-05-10 00:02:35 +01:00
parent 9d815f69a4
commit aeb7b19c53
1 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ int reload_config_file (const char *config_fname, struct config_s *conf)
goto done;
}
if (!conf->user) {
if (!conf->user && !geteuid()) {
log_message (LOG_WARNING, "You SHOULD set a UserName in the "
"config file. Using current user instead.");
}