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 committed 2021-05-10 00:03:43 +01:00
1 parent 9d815f69a4
commit aeb7b19c53
1 file changed
+1 -1
+1 -1
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.");
} }