@@ -10,6 +10,17 @@
|
||||
exec </dev/console >/dev/console 2>&1
|
||||
/bin/busybox --install -s /bin
|
||||
|
||||
# mkfs.ext4 -d preserves the checkout owner's uid. Production owns shadow as
|
||||
# root, and the UI intentionally rejects any other owner before verifying it.
|
||||
chown 0:0 /etc/shadow
|
||||
chmod 0600 /etc/shadow
|
||||
root_hash="$(awk -F: '$1 == "root" { print $2 }' /etc/shadow)"
|
||||
test_hash="$(printf '%s' root | /usr/bin/mkpasswd -m md5 -S wardenrs 2>/dev/null)"
|
||||
if [ -z "$root_hash" ] || [ "$test_hash" != "$root_hash" ]; then
|
||||
echo "FATAL: QEMU root credential verifier is unavailable"
|
||||
poweroff -f
|
||||
fi
|
||||
|
||||
mount -t proc proc /proc
|
||||
mount -t sysfs sysfs /sys
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
Reference in New Issue
Block a user