X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fngircd.c;h=0a62b02db7fec7e5838be46a9555df61c92bd2a4;hp=d87623309a134044bfee254429190b39a4f53f2f;hb=2bb917f05aafaf526736d0b7ade2f330835bbbe1;hpb=43fb18f2f5a506c4d78967e4b6e961b7339c98dc diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index d8762330..0a62b02d 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2017 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,20 +34,14 @@ #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 )); @@ -459,7 +451,7 @@ static void Show_Version( void ) { puts( NGIRCd_Version ); - puts( "Copyright (c)2001-2014 Alexander Barton () and Contributors." ); + puts( "Copyright (c)2001-2017 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." ); @@ -538,7 +530,7 @@ Pidfile_Create(pid_t pid) close(pidfd); return; } - + if (write(pidfd, pidbuf, (size_t)len) != (ssize_t)len) Log(LOG_ERR, "Can't write PID file (%s): %s!", Conf_PidFile, strerror(errno)); @@ -729,9 +721,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) Log(LOG_ERR, "Can't change group ID to %s(%u): %s!", grp ? grp->gr_name : "?", Conf_GID, strerror(real_errno)); - if (real_errno != EPERM) + 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!", @@ -739,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