From 796a8345471e46d98df8b647ad986e2d753ae089 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 3 Jul 2005 22:10:10 +0000 Subject: BUILD : 1.7.10 (845) BUGS : NOTES : Added a warning for *NIX when running as root git-svn-id: svn://svn.anope.org/anope/trunk@845 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@598 5417fbe8-f217-4b02-8779-1006273d7864 --- src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index 98fb4b372..23167e0e9 100644 --- a/src/main.c +++ b/src/main.c @@ -467,6 +467,17 @@ int main(int ac, char **av, char **envp) my_av = av; my_envp = envp; +#ifndef _WIN32 + /* If we're root, issue a warning now */ + if ((getuid() == 0) && (getgid() == 0)) { + fprintf(stderr, + "WARNING: You are currently running Anope as the root superuser. Anope does not\n"); + fprintf(stderr, + " require root privileges to run, and it is discouraged that you run Anope\n"); + fprintf(stderr, " as the root superuser.\n"); + } +#endif + /* General initialization first */ if ((i = init_primary(ac, av)) != 0) return i; -- cgit