11 lines
274 B
Bash
11 lines
274 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
output=$(mktemp)
|
|
trap 'rm -f "$output"' EXIT
|
|
if bash "$(dirname "$0")/audit-host.sh" >"$output" 2>&1; then
|
|
echo 'Host audit unexpectedly succeeded without root.' >&2
|
|
exit 1
|
|
fi
|
|
grep -qx 'Run this read-only audit as root.' "$output"
|