From ac57f41c8762050190badf1b24d67d260f869e00 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 7 Nov 2012 17:19:56 -0500 Subject: We no longer have to use the rungroup provided at build time, it is specified in the config now --- src/init.cpp | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'src') 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 #include #include -#include #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 > 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 */ -- cgit