pinentry: the curses fallback fails on a real tty #127

Open
opened 2026-08-23 23:03:15 +01:00 by joshquinlan · 0 comments
Owner

During the cutover, signing from a tty with GPG_TTY exported still ended in "No pinentry"; only --pinentry-mode loopback worked. donbox-pinentry decides shell reachability and execs pinentry-curses when the shell is absent, so either the reachability probe hangs without a session bus, the exec loses the tty, or the Assuan OPTION ttyname handshake is not forwarded to the curses child. Reproduce on a tty with the shell stopped: GPG_TTY=$(tty) gpg -u <key> --clearsign -o /dev/null <<< test; fix the fallback so a bare console can always answer a passphrase prompt, and add a suite case feeding OPTION ttyname before GETPIN.

During the cutover, signing from a tty with GPG_TTY exported still ended in "No pinentry"; only --pinentry-mode loopback worked. donbox-pinentry decides shell reachability and execs pinentry-curses when the shell is absent, so either the reachability probe hangs without a session bus, the exec loses the tty, or the Assuan OPTION ttyname handshake is not forwarded to the curses child. Reproduce on a tty with the shell stopped: `GPG_TTY=$(tty) gpg -u <key> --clearsign -o /dev/null <<< test`; fix the fallback so a bare console can always answer a passphrase prompt, and add a suite case feeding OPTION ttyname before GETPIN.
Sign in to join this conversation.
No description provided.