Skip to content

fix(uninstall): keep sudo password prompts terminal-safe - #2810

Open
tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:fix/uninstall-safe-sudo-prompt
Open

fix(uninstall): keep sudo password prompts terminal-safe#2810
tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:fix/uninstall-safe-sudo-prompt

Conversation

@tang-vu

@tang-vu tang-vu commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • acquire sudo credentials in a direct terminal-attached sudo -v step
  • run subsequent privileged uninstall commands non-interactively from the credential cache
  • keep interactive sudo out of timeout and stderr-redirection wrappers
  • exercise the public ods-uninstall.sh --force flow with a sudo-call-order regression test

Why this matters

Closes #2623. ods-uninstall.sh --force reaches privileged systemd, symlink, and ownership cleanup on normal Linux installs. The systemd path wrapped an interactive sudo process in timeout while redirecting its prompt, which can break terminal echo handling and was reported to print the operator's password on Debian 13. The new boundary performs credential acquisition directly on the terminal, then makes every wrapped command non-interactive.

Overlap check

Searched open and closed PRs for uninstall sudo password prompt, ods-uninstall sudo -v, issue #2623, and changes to ods/ods-uninstall.sh. No PR addresses the reported terminal-echo failure. Existing uninstall PRs cover checkout deletion, Compose cleanup, and path guards; none separates interactive authentication from timed privileged commands.

Test plan

  • bash -n ods/ods-uninstall.sh ods/tests/test-uninstall-compose-flags.sh
  • bash ods/tests/test-uninstall-compose-flags.sh
  • git diff --check

Generated with Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ods-uninstall.sh echoes sudo password to terminal

1 participant