mirror of
https://github.com/PDP-10/klh10.git
synced 2026-02-07 00:37:55 +00:00
Changed the check for superuser from error to warning.
The check is done so early that we can't reasonably know yet if we really need to be root. For VDE, root is unneeded, but for the other interface methods it is.
This commit is contained in:
@@ -434,7 +434,7 @@ main(int argc, char **argv)
|
||||
** we can, since a slow response will cause the 10 monitor to declare
|
||||
** the interface dead.
|
||||
*/
|
||||
#if CENV_SYS_SOLARIS || CENV_SYS_DECOSF || CENV_SYS_XBSD || CENV_SYS_LINUX
|
||||
#if HAVE_SETPRIORITY
|
||||
if (setpriority(PRIO_PROCESS, 0, -20) < 0)
|
||||
syserr(errno, "Warning - cannot set high priority");
|
||||
#elif CENV_SYS_UNIX /* Try old generic Unix call */
|
||||
@@ -455,8 +455,9 @@ main(int argc, char **argv)
|
||||
dbprint("Started");
|
||||
|
||||
/* General initialization */
|
||||
if (geteuid() != 0)
|
||||
efatal(1, "Must be superuser!");
|
||||
if (geteuid() != 0) {
|
||||
error("*** Must usually run as superuser; networking may fail! ***");
|
||||
}
|
||||
|
||||
if (!dp_main(&dp, argc, argv)) {
|
||||
efatal(1, "DP init failed!");
|
||||
|
||||
@@ -320,7 +320,7 @@ main(int argc, char **argv)
|
||||
#if 0 /* was CENV_SYS_SOLARIS */
|
||||
if (nice(-20) == -1)
|
||||
syserr(errno, "Warning - cannot set high priority");
|
||||
#elif CENV_SYS_SOLARIS || CENV_SYS_DECOSF || CENV_SYS_XBSD || CENV_SYS_LINUX
|
||||
#elif HAVE_SETPRIORITY
|
||||
if (setpriority(PRIO_PROCESS, 0, -20) < 0)
|
||||
syserr(errno, "Warning - cannot set high priority");
|
||||
#endif
|
||||
@@ -336,8 +336,9 @@ main(int argc, char **argv)
|
||||
dbprint("Started");
|
||||
|
||||
/* General initialization */
|
||||
if (geteuid() != 0)
|
||||
efatal(1, "Must be superuser!");
|
||||
if (geteuid() != 0) {
|
||||
error("*** Must usually run as superuser; networking may fail! ***");
|
||||
}
|
||||
|
||||
if (!dp_main(&dp, argc, argv)) {
|
||||
efatal(1, "DP init failed!");
|
||||
|
||||
Reference in New Issue
Block a user