X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fngircd.c;h=0e8acb54213e3a3c6e54e99affdf0b9bfed22871;hp=6af58169e48f6382056e7af68536eaceeb1e9fae;hb=2fc61ce8a6a6c2ac8652b8cea33d57acd50681c2;hpb=ea26fd2840f6c7f286407e86f832d6ec5e93eeeb diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 6af58169..0e8acb54 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,12 +17,10 @@ * by the loader of the operating system. */ -#include "imp.h" #include #include #include #include -#include #include #include #include @@ -36,23 +34,16 @@ #include #endif -#include "defines.h" #include "conn.h" #include "class.h" -#include "conf-ssl.h" #include "channel.h" #include "conf.h" -#include "lists.h" #include "log.h" -#include "parse.h" #include "sighandlers.h" #include "io.h" -#include "irc.h" -#include "exp.h" #include "ngircd.h" - static void Show_Version PARAMS(( void )); static void Show_Help PARAMS(( void )); @@ -460,7 +451,7 @@ static void Show_Version( void ) { puts( NGIRCd_Version ); - puts( "Copyright (c)2001-2013 Alexander Barton () and Contributors." ); + puts( "Copyright (c)2001-2014 Alexander Barton () and Contributors." ); puts( "Homepage: \n" ); puts( "This is free software; see the source for copying conditions. There is NO" ); puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ); @@ -613,6 +604,13 @@ NGIRCd_getNobodyID(uid_t *uid, gid_t *gid ) #endif +#ifdef HAVE_ARC4RANDOM +static void +Random_Init(void) +{ + +} +#else static bool Random_Init_Kern(const char *file) { @@ -642,6 +640,7 @@ Random_Init(void) return; srand(rand() ^ (unsigned)getpid() ^ (unsigned)time(NULL)); } +#endif /** @@ -725,6 +724,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) if (real_errno != EPERM) goto out; } +#ifdef HAVE_SETGROUPS if (setgroups(0, NULL) != 0) { real_errno = errno; Log(LOG_ERR, "Can't drop supplementary group IDs: %s!", @@ -732,6 +732,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) if (real_errno != EPERM) goto out; } +#else + Log(LOG_WARNING, + "Can't drop supplementary group IDs: setgroups(3) missing!"); +#endif } #endif