Commit 1be1184a authored by Leigh Stoller's avatar Leigh Stoller

Bug Fix: Allow root to runs this, as from opsreboot with the -b option.

parent f5cfc754
......@@ -52,15 +52,6 @@ if ($EUID != 0) {
" Must be setuid! Maybe its a development version?\n");
}
#
# This script is setuid, so please do not run it as root. Hard to track
# what has happened.
#
if ($UID == 0) {
die("*** $0:\n".
" Please do not run this as root! Its already setuid!\n");
}
#
# Turn off line buffering on output. Very important for this script!
#
......@@ -112,6 +103,15 @@ if (@ARGV) {
}
}
#
# This script is setuid, so please do not run it as root. Hard to track
# what has happened.
#
if (!$booting && $UID == 0) {
die("*** $0:\n".
" Please do not run this as root! Its already setuid!\n");
}
#
# This script is always audited. Mail is sent automatically upon exit.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment