Repository navigation
Let users choose passwordless sudo duration - #14435
Conversation
|
|
Nice to have the picker and the red indicator. A few things I noticed reading the diff:
if [[ ${1:-} == "--active" ]]; then
(($# == 1)) || usage
policy=$(/usr/bin/sudo -n -N -l -l -- "$INSTALLED_SELF" __status "$(/usr/bin/id -u)" 2>/dev/null) || exit 2
/usr/bin/grep -q '!authenticate' <<<"$policy" && exit 0
exit 1
fi…and in QML,
Heads-up: #14413 overlaps this (same |
The duration rework in omacom#14435 rewrote the status paragraph in docs/passwordless-sudo.md; keep its text and the reserved-prefix sentence this branch adds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ask how long passwordless sudo should remain enabled with a Gum picker offering 15 minutes, 1 Hour, 1 Day, or Permanently. Running the command again disables active access, and explicit minute arguments remain supported alongside
permanent. Permanent access always requires confirmation. Enabling access prompts for the sudo password only once.Show the passwordless sudo icon in red in the menu bar while access is active, using the same hover and layout behavior as the other indicators. Place it before Dictation in the default indicator order. Clicking the active icon disables access in the background without opening a terminal. The indicator normally reads sudo policy and falls back to a noninteractive status check when listings require authentication. Neither path prompts or refreshes cached credentials, and the indicator updates as access expires.
Permanent grants survive reboots and temporary-grant cleanup until explicitly disabled. Timed grants retain their native sudoers deadlines and expiry timers, with uninterrupted renewal. Interrupted duration switches remain inspectable and revocable, and password-required sudo listings do not block grant changes. Update the manual and reference documentation to cover both durations and the indicator.
Reviewed by Claude Opus 5.5