summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2021-05-10 00:02:35 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2021-05-10 00:03:43 +0100
commitaeb7b19c53b26bfcd85805737ed3c6263f634a7c (patch)
treecffaf874fffd021df549e5875a7a5156f0b8fa4e
parent9d815f69a4fa9baf2b2ce99fa09b12c8b5254589 (diff)
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.
-rw-r--r--src/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index 7e3c031..1a78816 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -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.");
}