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 --- Changes | 1 + src/main.c | 11 +++++++++++ version.log | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 991226de6..0356ffad9 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Anope Version S V N -------------------- Provided by Anope Dev. - 2005 +07/04 A Warning when running Anope as root (DON'T DO THAT! :)). [ #00] 07/01 A Events for channel access/xop updates. [ #00] 06/26 A New module pack module: hs_request. [ #00] 06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389] 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; diff --git a/version.log b/version.log index bf1924dcb..514814abc 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="10" -VERSION_BUILD="844" +VERSION_BUILD="845" # $Log$ # +# BUILD : 1.7.10 (845) +# BUGS : +# NOTES : Added a warning for *NIX when running as root +# # BUILD : 1.7.10 (844) # BUGS : # NOTES : Fixed module languages defaulting to english instead of NSDefLanguage -- cgit