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.
This commit is contained in:
rofl0r 2021-05-10 00:02:35 +01:00
parent 9d815f69a4
commit aeb7b19c53

View File

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