diff --git a/bin/omarchy-security-functions b/bin/omarchy-security-functions index 890d4430..12ad8a78 100755 --- a/bin/omarchy-security-functions +++ b/bin/omarchy-security-functions @@ -10,13 +10,18 @@ fi omarchy_security_require_privileged_bash_startup() { [[ $- == *p* ]] || return 1 + # The caller is this check's parent, under the number this /proc gives it. + # arch-chroot runs the installer in a new PID namespace beneath the outer + # /proc, where $$ names no process, or someone else's. /usr/bin/env -i /usr/bin/bash -p -c ' - mapfile -d "" -t argv <"/proc/$1/cmdline" || exit 1 - executable=$(/usr/bin/readlink -e -- "/proc/$1/exe") || exit 1 + stat=$("$test_tmp/entrypoint" </dev/null; then + "${in_new_pid_namespace[@]}" /usr/bin/bash -c "for i in {1..50}; do /usr/bin/true; done; '$test_tmp/entrypoint'; exit"