1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 17:43:13 +02:00

UnrealIRCd will now refuse to run as root, as promised a couple of versions ago.

https://www.unrealircd.org/docs/Do_not_run_as_root
This commit is contained in:
Bram Matthys
2017-05-12 11:42:01 +02:00
parent 3dc27370a1
commit bbf33b62dc
2 changed files with 12 additions and 8 deletions
+2
View File
@@ -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:
+10 -8
View File
@@ -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);