diff options
author | Adam <Adam@anope.org> | 2012-11-07 17:19:56 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-07 19:36:59 -0500 |
commit | ac57f41c8762050190badf1b24d67d260f869e00 (patch) | |
tree | 2de74f53c2104e2ca9c4883317e4bd2eb49946fe /src/init.cpp | |
parent | 8b78b6bb104e8c1088d066f153967678b50a15a8 (diff) |
We no longer have to use the rungroup provided at build time, it is specified in the config now
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/init.cpp b/src/init.cpp index cd53129a8..94ac7feb2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -21,10 +21,8 @@ #include "servers.h" #ifndef _WIN32 -#include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> -#include <grp.h> #endif Anope::string conf_dir = "conf", db_dir = "data", modules_dir = "lib", locale_dir = "locale", log_dir = "logs"; @@ -68,37 +66,6 @@ void introduce_user(const Anope::string &user) /*************************************************************************/ -/* Set GID if necessary. Return 0 if successful (or if RUNGROUP not - * defined), else print an error message to logfile and return -1. - */ - -static int set_group() -{ -#if defined(RUNGROUP) && defined(HAVE_SETGRENT) - struct group *gr; - - setgrent(); - while ((gr = getgrent())) - { - if (!strcmp(gr->gr_name, RUNGROUP)) - break; - } - endgrent(); - if (gr) - { - setgid(gr->gr_gid); - } - else - { - Log() << "Unknown run group '" << RUNGROUP << "'"; - return -1; - } -#endif - return 0; -} - -/*************************************************************************/ - /* Vector of pairs of command line arguments and their params */ static std::vector<std::pair<Anope::string, Anope::string> > CommandLineArguments; @@ -294,9 +261,7 @@ void Init(int ac, char **av) #if defined(DEFUMASK) && HAVE_UMASK umask(DEFUMASK); #endif - if (set_group() < 0) - throw FatalException("set_group() fail"); - + RegisterTypes(); /* Parse command line arguments */ |