X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fngircd.c;h=c2169c4377af04b1f2c11884903ed5b26341a56a;hp=fd919e34becff5f6c7a33963e9b5d4e591fd991d;hb=HEAD;hpb=8fdb8f90b1756520f173a0dc11a2320cb63c0a4e diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index fd919e34..c2169c43 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2023 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2024 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 @@ -92,8 +92,6 @@ main(int argc, const char *argv[]) #ifdef SNIFFER NGIRCd_Sniffer = false; #endif - strlcpy(NGIRCd_ConfFile, SYSCONFDIR, sizeof(NGIRCd_ConfFile)); - strlcat(NGIRCd_ConfFile, CONFIG_FILE, sizeof(NGIRCd_ConfFile)); Fill_Version(); @@ -457,7 +455,7 @@ static void Show_Version( void ) { puts( NGIRCd_Version ); - puts( "Copyright (c)2001-2023 Alexander Barton () and Contributors." ); + puts( "Copyright (c)2001-2024 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." ); @@ -724,7 +722,7 @@ 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 && real_errno != EINVAL) goto out; } #ifdef HAVE_SETGROUPS @@ -750,7 +748,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) Log(LOG_ERR, "Can't change user ID to %s(%u): %s!", pwd ? pwd->pw_name : "?", Conf_UID, strerror(real_errno)); - if (real_errno != EPERM) + if (real_errno != EPERM && real_errno != EINVAL) goto out; } } @@ -758,7 +756,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) initialized = true; /* Normally a child process is forked which isn't any longer - * connected to ther controlling terminal. Use "--nodaemon" + * connected to the controlling terminal. Use "--nodaemon" * to disable this "daemon mode" (useful for debugging). */ if (!NGIRCd_NoDaemon) { pid = fork(); @@ -828,7 +826,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) "Can't change working directory to \"%s\": %s!", pwd->pw_dir, strerror(errno)); } else - Log(LOG_ERR, "Can't get user informaton for UID %d!?", Conf_UID); + Log(LOG_ERR, "Can't get user information for UID %d!?", Conf_UID); return true; out: