diff --git a/doc/RELEASE-NOTES b/doc/RELEASE-NOTES index dfb21e195..a940b05c3 100644 --- a/doc/RELEASE-NOTES +++ b/doc/RELEASE-NOTES @@ -37,6 +37,8 @@ Other changes: modules (and thus not bugs in our code). We now ask users to unload any recently installed 3rd party modules first, see if the crash issue persists, and only then submit a crash report to us. +* UnrealIRCd will now refuse to run as root + https://www.unrealircd.org/docs/Do_not_run_as_root Module coders: * Added two functions to search for user modes: diff --git a/src/ircd.c b/src/ircd.c index 3b60cdf68..a3c5cd5ec 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -1020,14 +1020,16 @@ int InitUnrealIRCd(int argc, char *argv[]) if (euid == 0) { fprintf(stderr, - "WARNING: You are running UnrealIRCd as root. This is VERY DANGEROUS\n" - " as any compromise of your UnrealIRCd will result in full\n" - " privileges to the attacker on the entire machine.\n" - " You should start UnrealIRCd as a different user!!\n"); - sleep(1); - fprintf(stderr, "\nIn a later version we will refuse starting UnrealIRCd as root, see " - "https://www.unrealircd.org/docs/Do_not_run_as_root\n\n"); - sleep(10); /* just to catch their attention */ + "** ERROR **\n" + "You attempted to run UnrealIRCd as root. This is VERY DANGEROUS\n" + "as any compromise of your UnrealIRCd will result in full\n" + "privileges to the attacker on the entire machine.\n" + "You MUST start UnrealIRCd as a different user!\n" + "\n" + "For more information, see:\n" + "https://www.unrealircd.org/docs/Do_not_run_as_root\n" + "\n"); + exit(1); } # ifdef PROFIL (void)monstartup(0, etext);