From 864c787281d7690b2f2dddf6b526140fc1b0819d Mon Sep 17 00:00:00 2001 From: statick88 Date: Tue, 20 Oct 2026 15:18:53 -0500 Subject: [PATCH 1/3] Let `sudo -v` validate against the passwordless sudo grant Under sudo's default verifypw=all, one password-requiring entry anywhere in the policy is enough to make `sudo -v` prompt, so a user who enabled passwordless sudo could not validate credentials without a password. The installer's own admin grant is password-requiring, and package drop-ins add more, so the grant cannot be the only entry that carries NOPASSWD. The published grant now carries the sudoers default that makes validation read the grant instead of every other entry, and a grant published before that default existed is rewritten in place. --- bin/omarchy-sudo-passwordless | 57 ++++++++++++++- migrations/1792527479.sh | 8 ++ .../passwordless-sudo-verifypw-test.sh | 73 +++++++++++++++++++ 3 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 migrations/1792527479.sh create mode 100755 test/shell.d/passwordless-sudo-verifypw-test.sh diff --git a/bin/omarchy-sudo-passwordless b/bin/omarchy-sudo-passwordless index badf65ea477f..547f7813ffcb 100755 --- a/bin/omarchy-sudo-passwordless +++ b/bin/omarchy-sudo-passwordless @@ -31,6 +31,11 @@ readonly MIGRATION_MARKER=/var/lib/omarchy/migrations/1788163635 readonly QUARANTINE_DIR=/var/lib/omarchy/sudoers-quarantine readonly INSTALLED_SELF=/usr/bin/omarchy-sudo-passwordless readonly STATUS_INACTIVE=3 +# The published grant carries this sudoers default above its rule. Under +# sudo's default verifypw=all, one password-requiring entry anywhere in the +# policy is enough to make `sudo -v` prompt, so a user who asked for +# passwordless sudo could not validate their credentials without a password. +readonly VERIFYPW_DEFAULT='Defaults verifypw = any' usage() { echo "Usage: omarchy-sudo-passwordless [MINUTES|permanent|--active|--disable]" >&2 @@ -107,6 +112,17 @@ rule_file() { fi } +# The published policy carries the sudoers default above the rule. A grant +# published before that default existed carries the rule alone, and both forms +# are this command's own grant. +strip_grant_default() { + local contents=$1 + if [[ $contents == "$VERIFYPW_DEFAULT"$'\n'* ]]; then + contents=${contents#*$'\n'} + fi + printf '%s' "$contents" +} + # The sudoers rule is the only grant record. A missing file is distinct from # an unreadable, unsafe, or administrator-modified file. read_grant() { @@ -116,6 +132,7 @@ read_grant() { if [[ -e $permanent || -L $permanent ]]; then verify_root_path "$permanent" && [[ -f $permanent ]] || return 2 contents=$(/usr/bin/cat -- "$permanent") || return 2 + contents=$(strip_grant_default "$contents") || return 2 [[ $contents =~ ^([a-z_][a-z0-9_-]*\$?)\ ALL=\(ALL\)\ NOPASSWD:\ ALL$ ]] || return 2 GRANT_NAME=${BASH_REMATCH[1]} GRANT_DEADLINE="" @@ -127,6 +144,7 @@ read_grant() { # both files, and the next duration change finishes their replacement. verify_root_path "$file" && [[ -f $file ]] || return 2 contents=$(/usr/bin/cat -- "$file") || return 2 + contents=$(strip_grant_default "$contents") || return 2 [[ $contents =~ ^([a-z_][a-z0-9_-]*\$?)\ ALL=\(ALL\)\ NOTAFTER=([0-9]{14}Z)\ NOPASSWD:\ ALL$ ]] || return 2 [[ ${BASH_REMATCH[1]} == "$GRANT_NAME" ]] || return 2 fi @@ -135,6 +153,7 @@ read_grant() { [[ -e $file || -L $file ]] || return "$STATUS_INACTIVE" verify_root_path "$file" && [[ -f $file ]] || return 2 contents=$(/usr/bin/cat -- "$file") || return 2 + contents=$(strip_grant_default "$contents") || return 2 [[ $contents =~ ^([a-z_][a-z0-9_-]*\$?)\ ALL=\(ALL\)\ NOTAFTER=([0-9]{14}Z)\ NOPASSWD:\ ALL$ ]] || return 2 GRANT_NAME=${BASH_REMATCH[1]} GRANT_DEADLINE=${BASH_REMATCH[2]} @@ -148,6 +167,7 @@ classify_generated_rule() { [[ -f $file && ! -L $file ]] || return 1 contents=$(/usr/bin/cat -- "$file") || return 2 + contents=$(strip_grant_default "$contents") || return 2 suffix=${file##*/99-omarchy-nopasswd-} if [[ $file == */99-omarchy-permanent-nopasswd-* ]]; then suffix=${file##*/99-omarchy-permanent-nopasswd-} @@ -372,12 +392,12 @@ enable_locked() ( omarchy_security_install_signal_exit_traps pending=$(/usr/bin/mktemp /etc/sudoers.d/.omarchy-nopasswd.XXXXXX) || return 1 if [[ $minutes == "permanent" ]]; then - /usr/bin/printf '%s ALL=(ALL) NOPASSWD: ALL\n' "$ACCOUNT_NAME" >"$pending" || return 1 + /usr/bin/printf '%s\n%s ALL=(ALL) NOPASSWD: ALL\n' "$VERIFYPW_DEFAULT" "$ACCOUNT_NAME" >"$pending" || return 1 else now=$(/usr/bin/date +%s) || return 1 expires=$((now + 10#$minutes * 60)) deadline=$(/usr/bin/date -u -d "@$expires" +%Y%m%d%H%M%SZ) || return 1 - /usr/bin/printf '%s ALL=(ALL) NOTAFTER=%s NOPASSWD: ALL\n' "$ACCOUNT_NAME" "$deadline" >"$pending" || return 1 + /usr/bin/printf '%s\n%s ALL=(ALL) NOTAFTER=%s NOPASSWD: ALL\n' "$VERIFYPW_DEFAULT" "$ACCOUNT_NAME" "$deadline" >"$pending" || return 1 fi /usr/bin/chown root:root "$pending" && /usr/bin/chmod 0440 "$pending" || return 1 /usr/sbin/visudo -cf "$pending" >/dev/null || return 1 @@ -408,6 +428,35 @@ enable_locked() ( fi ) +# Rewrite the grants this command published before the sudoers default +# existed, so a user who already asked for passwordless sudo gets the same +# credential validation as one who enables it now. A grant that already +# carries the default, and any policy this command did not write, are left +# alone: the first needs no change, and the second belongs to the +# administrator. +upgrade_grant_format_locked() { + local file contents pending failed=0 + verify_root_path /etc/sudoers.d || return 1 + for file in /etc/sudoers.d/99-omarchy-nopasswd-* /etc/sudoers.d/99-omarchy-permanent-nopasswd-*; do + [[ -e $file ]] || continue + verify_root_path "$file" && [[ -f $file && ! -L $file ]] || { failed=1; continue; } + contents=$(/usr/bin/cat -- "$file") || { failed=1; continue; } + [[ $contents == "$VERIFYPW_DEFAULT"$'\n'* ]] && continue + classify_generated_rule "$file" || continue + pending=$(/usr/bin/mktemp /etc/sudoers.d/.omarchy-nopasswd.XXXXXX) || { failed=1; continue; } + if ! /usr/bin/printf '%s\n%s\n' "$VERIFYPW_DEFAULT" "$contents" >"$pending" || + ! /usr/bin/chown root:root "$pending" || + ! /usr/bin/chmod 0440 "$pending" || + ! /usr/sbin/visudo -cf "$pending" >/dev/null || + ! /usr/bin/mv -fT -- "$pending" "$file"; then + /usr/bin/rm -f -- "$pending" + failed=1 + continue + fi + done + (( failed == 0 )) +} + root_dispatch() { local action="$1" status shift @@ -450,6 +499,10 @@ root_dispatch() { (($# == 0)) && ((EUID == 0)) || return 1 with_root_lock migrate_locked ;; + __upgrade-grant-format) + (($# == 0)) && ((EUID == 0)) || return 1 + with_root_lock upgrade_grant_format_locked + ;; __cleanup-all) (($# == 0)) && ((EUID == 0)) || return 1 with_root_lock cleanup_all_locked diff --git a/migrations/1792527479.sh b/migrations/1792527479.sh new file mode 100644 index 000000000000..5f464980c8de --- /dev/null +++ b/migrations/1792527479.sh @@ -0,0 +1,8 @@ +echo "Publish the sudoers default that lets \`sudo -v\` validate against the passwordless grant" + +# The grant file is the only record of the passwordless sudo policy, and it +# now carries the sudoers default that makes `sudo -v` validate against the +# grant instead of every other entry in the policy. A grant published before +# that default existed is rewritten in place, keeping its rule and deadline. +helper="$OMARCHY_PATH/bin/omarchy-sudo-passwordless" +sudo "$helper" __upgrade-grant-format diff --git a/test/shell.d/passwordless-sudo-verifypw-test.sh b/test/shell.d/passwordless-sudo-verifypw-test.sh new file mode 100755 index 000000000000..36f82f7abb8d --- /dev/null +++ b/test/shell.d/passwordless-sudo-verifypw-test.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +set -euo pipefail +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" +source "$SHELL_TEST_DIR/fixtures/passwordless-sudo-test.sh" + +# Under sudo's default verifypw=all, `sudo -v` asks for a password unless every +# entry the user has is passwordless. The installer's own admin grant is +# password-requiring, so a user who asked for passwordless sudo could not +# validate their credentials without a password. The published grant therefore +# carries the sudoers default that makes validation read the grant instead of +# every other entry in the policy. + +( + source "$library" + enable_locked 1000 15 + head -1 "$(rule_file 1000)" | grep -qx 'Defaults verifypw = any' + tail -1 "$(rule_file 1000)" | grep -qx 'audituser ALL=(ALL) NOTAFTER=[0-9]\{14\}Z NOPASSWD: ALL' +) +pass "the published grant carries the sudoers default above its rule" + +( + source "$library" + enable_locked 1000 permanent + head -1 "$(rule_file 1000 permanent)" | grep -qx 'Defaults verifypw = any' + tail -1 "$(rule_file 1000 permanent)" | grep -qx 'audituser ALL=(ALL) NOPASSWD: ALL' +) +pass "a permanent grant carries the sudoers default above its rule" + +# A grant published before the default existed is still this command's grant, +# so it keeps working until it is rewritten. +( + source "$library" + reset_grant + printf 'audituser ALL=(ALL) NOPASSWD: ALL\n' >"$(rule_file 1000 permanent)" + read_grant 1000 + [[ $GRANT_NAME == "audituser" ]] +) +pass "a grant published before the default existed is still read as the user's grant" + +# The upgrade rewrites such a grant in place, keeping the rule and its +# deadline exactly as they were. +( + source "$library" + reset_grant + printf 'audituser ALL=(ALL) NOTAFTER=20261231235959Z NOPASSWD: ALL\n' >"$(rule_file 1000)" + upgrade_grant_format_locked + head -1 "$(rule_file 1000)" | grep -qx 'Defaults verifypw = any' + tail -1 "$(rule_file 1000)" | grep -qx 'audituser ALL=(ALL) NOTAFTER=20261231235959Z NOPASSWD: ALL' + [[ $(wc -l <"$(rule_file 1000)") == 2 ]] +) +pass "the upgrade rewrites a grant published before the default existed" + +( + source "$library" + reset_grant + printf 'audituser ALL=(ALL) NOPASSWD: ALL\n' >"$(rule_file 1000 permanent)" + upgrade_grant_format_locked + upgrade_grant_format_locked + [[ $(wc -l <"$(rule_file 1000 permanent)") == 2 ]] + tail -1 "$(rule_file 1000 permanent)" | grep -qx 'audituser ALL=(ALL) NOPASSWD: ALL' +) +pass "the upgrade leaves a grant that already carries the default alone" + +# Policy this command did not generate stays untouched: it belongs to the +# administrator, and rewriting it would publish a rule nobody asked for. +( + source "$library" + printf 'admin ALL=(ALL) NOPASSWD: /usr/bin/true\n' >"$test_tmp/etc/sudoers.d/99-omarchy-nopasswd-custom" + upgrade_grant_format_locked + [[ $(cat "$test_tmp/etc/sudoers.d/99-omarchy-nopasswd-custom") == 'admin ALL=(ALL) NOPASSWD: /usr/bin/true' ]] +) +pass "the upgrade leaves administrator policy under the generated prefix alone" From eed0ed6dc84872aeb83d50575dde52626196548c Mon Sep 17 00:00:00 2001 From: statick88 Date: Tue, 20 Oct 2026 16:58:58 -0500 Subject: [PATCH 2/3] Scope the sudoers default to the account that asked for the grant The default was unqualified, so publishing a grant for one account changed the credential validation of every account on the host, and displaced a verifypw setting an administrator had configured. The default now names the account the grant belongs to, and a file whose default names another account is not read as this command's grant. --- bin/omarchy-sudo-passwordless | 35 ++++++++++++++----- .../passwordless-sudo-verifypw-test.sh | 32 +++++++++++++---- 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/bin/omarchy-sudo-passwordless b/bin/omarchy-sudo-passwordless index 547f7813ffcb..9e4f8704c5c9 100755 --- a/bin/omarchy-sudo-passwordless +++ b/bin/omarchy-sudo-passwordless @@ -35,7 +35,12 @@ readonly STATUS_INACTIVE=3 # sudo's default verifypw=all, one password-requiring entry anywhere in the # policy is enough to make `sudo -v` prompt, so a user who asked for # passwordless sudo could not validate their credentials without a password. -readonly VERIFYPW_DEFAULT='Defaults verifypw = any' +# The default names the account that asked for the grant: an unqualified +# Defaults line would change the rule for every account on the host, and +# would displace what an administrator configured. +verifypw_default() { + printf 'Defaults:%s verifypw = any' "$1" +} usage() { echo "Usage: omarchy-sudo-passwordless [MINUTES|permanent|--active|--disable]" >&2 @@ -114,10 +119,18 @@ rule_file() { # The published policy carries the sudoers default above the rule. A grant # published before that default existed carries the rule alone, and both forms -# are this command's own grant. +# are this command's own grant. The default names the account the grant +# belongs to, so a file whose default names another account is not this +# command's grant and is left alone. strip_grant_default() { - local contents=$1 - if [[ $contents == "$VERIFYPW_DEFAULT"$'\n'* ]]; then + local contents=$1 default_account rule_account + if [[ $contents == "Defaults:"*" verifypw = any"$'\n'* ]]; then + default_account=${contents%%$'\n'*} + default_account=${default_account#Defaults:} + default_account=${default_account%" verifypw = any"} + rule_account=${contents#*$'\n'} + rule_account=${rule_account%% *} + [[ $default_account == "$rule_account" ]] || return 1 contents=${contents#*$'\n'} fi printf '%s' "$contents" @@ -392,12 +405,12 @@ enable_locked() ( omarchy_security_install_signal_exit_traps pending=$(/usr/bin/mktemp /etc/sudoers.d/.omarchy-nopasswd.XXXXXX) || return 1 if [[ $minutes == "permanent" ]]; then - /usr/bin/printf '%s\n%s ALL=(ALL) NOPASSWD: ALL\n' "$VERIFYPW_DEFAULT" "$ACCOUNT_NAME" >"$pending" || return 1 + /usr/bin/printf '%s\n%s ALL=(ALL) NOPASSWD: ALL\n' "$(verifypw_default "$ACCOUNT_NAME")" "$ACCOUNT_NAME" >"$pending" || return 1 else now=$(/usr/bin/date +%s) || return 1 expires=$((now + 10#$minutes * 60)) deadline=$(/usr/bin/date -u -d "@$expires" +%Y%m%d%H%M%SZ) || return 1 - /usr/bin/printf '%s\n%s ALL=(ALL) NOTAFTER=%s NOPASSWD: ALL\n' "$VERIFYPW_DEFAULT" "$ACCOUNT_NAME" "$deadline" >"$pending" || return 1 + /usr/bin/printf '%s\n%s ALL=(ALL) NOTAFTER=%s NOPASSWD: ALL\n' "$(verifypw_default "$ACCOUNT_NAME")" "$ACCOUNT_NAME" "$deadline" >"$pending" || return 1 fi /usr/bin/chown root:root "$pending" && /usr/bin/chmod 0440 "$pending" || return 1 /usr/sbin/visudo -cf "$pending" >/dev/null || return 1 @@ -435,16 +448,20 @@ enable_locked() ( # alone: the first needs no change, and the second belongs to the # administrator. upgrade_grant_format_locked() { - local file contents pending failed=0 + local file contents account pending failed=0 verify_root_path /etc/sudoers.d || return 1 for file in /etc/sudoers.d/99-omarchy-nopasswd-* /etc/sudoers.d/99-omarchy-permanent-nopasswd-*; do [[ -e $file ]] || continue verify_root_path "$file" && [[ -f $file && ! -L $file ]] || { failed=1; continue; } contents=$(/usr/bin/cat -- "$file") || { failed=1; continue; } - [[ $contents == "$VERIFYPW_DEFAULT"$'\n'* ]] && continue + [[ $contents == "Defaults:"*" verifypw = any"$'\n'* ]] && continue classify_generated_rule "$file" || continue + # The default names the account the grant belongs to, and the rule names + # it too. An account name the policy would not accept is left alone. + account=${contents%% *} + valid_account_name "$account" || continue pending=$(/usr/bin/mktemp /etc/sudoers.d/.omarchy-nopasswd.XXXXXX) || { failed=1; continue; } - if ! /usr/bin/printf '%s\n%s\n' "$VERIFYPW_DEFAULT" "$contents" >"$pending" || + if ! /usr/bin/printf '%s\n%s\n' "$(verifypw_default "$account")" "$contents" >"$pending" || ! /usr/bin/chown root:root "$pending" || ! /usr/bin/chmod 0440 "$pending" || ! /usr/sbin/visudo -cf "$pending" >/dev/null || diff --git a/test/shell.d/passwordless-sudo-verifypw-test.sh b/test/shell.d/passwordless-sudo-verifypw-test.sh index 36f82f7abb8d..bd3d7de2fa9f 100755 --- a/test/shell.d/passwordless-sudo-verifypw-test.sh +++ b/test/shell.d/passwordless-sudo-verifypw-test.sh @@ -7,26 +7,36 @@ source "$SHELL_TEST_DIR/fixtures/passwordless-sudo-test.sh" # Under sudo's default verifypw=all, `sudo -v` asks for a password unless every # entry the user has is passwordless. The installer's own admin grant is # password-requiring, so a user who asked for passwordless sudo could not -# validate their credentials without a password. The published grant therefore +# validate credentials without a password. The published grant therefore # carries the sudoers default that makes validation read the grant instead of -# every other entry in the policy. +# every other entry in the policy. The default names the account that asked +# for the grant, so it changes the rule for that account alone. ( source "$library" enable_locked 1000 15 - head -1 "$(rule_file 1000)" | grep -qx 'Defaults verifypw = any' - tail -1 "$(rule_file 1000)" | grep -qx 'audituser ALL=(ALL) NOTAFTER=[0-9]\{14\}Z NOPASSWD: ALL' + head -1 "$(rule_file 1000)" | grep -qx 'Defaults:audituser verifypw = any' + tail -1 "$(rule_file 1000)" | grep -qxE 'audituser ALL=\(ALL\) NOTAFTER=[0-9]{14}Z NOPASSWD: ALL' ) pass "the published grant carries the sudoers default above its rule" ( source "$library" enable_locked 1000 permanent - head -1 "$(rule_file 1000 permanent)" | grep -qx 'Defaults verifypw = any' + head -1 "$(rule_file 1000 permanent)" | grep -qx 'Defaults:audituser verifypw = any' tail -1 "$(rule_file 1000 permanent)" | grep -qx 'audituser ALL=(ALL) NOPASSWD: ALL' ) pass "a permanent grant carries the sudoers default above its rule" +# The default is scoped to the account that asked for the grant, so it never +# changes the rule for another account on the host. +( + source "$library" + enable_locked 1000 15 + ! grep -q '^Defaults verifypw' "$(rule_file 1000)" +) +pass "the published default is scoped to the account that asked for the grant" + # A grant published before the default existed is still this command's grant, # so it keeps working until it is rewritten. ( @@ -38,6 +48,15 @@ pass "a permanent grant carries the sudoers default above its rule" ) pass "a grant published before the default existed is still read as the user's grant" +# A default that names another account is not this command's grant. +( + source "$library" + reset_grant + printf 'Defaults:root verifypw = any\naudituser ALL=(ALL) NOPASSWD: ALL\n' >"$(rule_file 1000 permanent)" + assert_status 2 read_grant 1000 +) +pass "a default that names another account is not read as the user's grant" + # The upgrade rewrites such a grant in place, keeping the rule and its # deadline exactly as they were. ( @@ -45,7 +64,7 @@ pass "a grant published before the default existed is still read as the user's g reset_grant printf 'audituser ALL=(ALL) NOTAFTER=20261231235959Z NOPASSWD: ALL\n' >"$(rule_file 1000)" upgrade_grant_format_locked - head -1 "$(rule_file 1000)" | grep -qx 'Defaults verifypw = any' + head -1 "$(rule_file 1000)" | grep -qx 'Defaults:audituser verifypw = any' tail -1 "$(rule_file 1000)" | grep -qx 'audituser ALL=(ALL) NOTAFTER=20261231235959Z NOPASSWD: ALL' [[ $(wc -l <"$(rule_file 1000)") == 2 ]] ) @@ -58,6 +77,7 @@ pass "the upgrade rewrites a grant published before the default existed" upgrade_grant_format_locked upgrade_grant_format_locked [[ $(wc -l <"$(rule_file 1000 permanent)") == 2 ]] + head -1 "$(rule_file 1000 permanent)" | grep -qx 'Defaults:audituser verifypw = any' tail -1 "$(rule_file 1000 permanent)" | grep -qx 'audituser ALL=(ALL) NOPASSWD: ALL' ) pass "the upgrade leaves a grant that already carries the default alone" From 15cfd5615c3db9cbc820d54f247725c395586fdc Mon Sep 17 00:00:00 2001 From: statick88 Date: Tue, 20 Oct 2026 18:11:35 -0500 Subject: [PATCH 3/3] Reach the grant upgrade through the command's own dispatch The action was only reachable from inside the script, so the migration's call fell through to the user-facing arguments, valid_duration rejected it and the helper exited 1. That would have stopped omarchy-migrate on every machine that reached the migration and left every later migration pending. The action is dispatched now, and the test drives it through the executable and through the migration itself. --- bin/omarchy-sudo-passwordless | 2 +- .../shell.d/passwordless-sudo-verifypw-test.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-sudo-passwordless b/bin/omarchy-sudo-passwordless index 9e4f8704c5c9..e5f60b838f9f 100755 --- a/bin/omarchy-sudo-passwordless +++ b/bin/omarchy-sudo-passwordless @@ -568,7 +568,7 @@ show_enabled() { } case "${1:-}" in - __status|__enable|__disable|__expire|__cleanup-all|__package-removing|__migrate|__migration-complete) + __status|__enable|__disable|__expire|__cleanup-all|__package-removing|__migrate|__migration-complete|__upgrade-grant-format) action=$1 shift root_dispatch "$action" "$@" diff --git a/test/shell.d/passwordless-sudo-verifypw-test.sh b/test/shell.d/passwordless-sudo-verifypw-test.sh index bd3d7de2fa9f..213e2f11585c 100755 --- a/test/shell.d/passwordless-sudo-verifypw-test.sh +++ b/test/shell.d/passwordless-sudo-verifypw-test.sh @@ -91,3 +91,21 @@ pass "the upgrade leaves a grant that already carries the default alone" [[ $(cat "$test_tmp/etc/sudoers.d/99-omarchy-nopasswd-custom") == 'admin ALL=(ALL) NOPASSWD: /usr/bin/true' ]] ) pass "the upgrade leaves administrator policy under the generated prefix alone" + +# The migration reaches the upgrade through the command's own dispatch, so the +# action has to be reachable from the executable and not only from inside it. +( + PATH="$test_tmp/bin:$PATH" TEST_EUID=0 "$test_tmp/omarchy-sudo-passwordless" __upgrade-grant-format +) +pass "the upgrade action is reachable through the command's own dispatch" + +# The migration itself has to run: it reaches the upgrade through that +# dispatch, and a failure there would stop the queue and leave every later +# migration pending. +mkdir -p "$test_tmp/source/bin" +ln -sf "$test_tmp/omarchy-sudo-passwordless" "$test_tmp/source/bin/omarchy-sudo-passwordless" +( + PATH="$test_tmp/bin:$PATH" TEST_MIGRATION=1 OMARCHY_PATH="$test_tmp/source" \ + /usr/bin/bash "$ROOT/migrations/1792527479.sh" +) +pass "the migration runs the upgrade through the command's own dispatch"