我正在查看 Quake II 源代码,发现它们阻止了用户运行游戏root
:
/* Prevent running Quake II as root. Only very mad
minded or stupid people even think about it. :) */
if (getuid() == 0)
{
printf("Quake II shouldn't be run as root! Backing out to save your ass. If\n");
printf("you really know what you're doing, edit src/unix/main.c and remove\n");
printf("this check. But don't complain if Quake II eats your dog afterwards!\n");
return 1;
}
在 Quake II 中这样做的具体原因是什么?