https://bugs.kde.org/show_bug.cgi?id=521012

--- Comment #3 from Mark Cockram <[email protected]> ---
Apologies for the previous comment: I pasted my whole bug report drafts notes
file instead of the comment, and comments cannot be deleted here. I didn't
notice the whole paste was being submitted. The textarea on this web page does
not indicate if there is text in scrollback. I didn't see what I was
submitting.

The relevant part, condensed:

Still open on current master (5ffde2d4): the prompt is the only input,
https://invent.kde.org/plasma/ksshaskpass/-/blame/5ffde2d4e5317a510f08a941aa0ac074a25db381/src/main.cpp#L83-105
, and a prompt matching no known ssh/git pattern is shown verbatim,
https://invent.kde.org/plasma/ksshaskpass/-/blame/5ffde2d4e5317a510f08a941aa0ac074a25db381/src/prompt.cpp#L223
. The askpass protocol gives ksshaskpass a single prompt string and nothing
else (classic sudo and sudo-rs alike), so caller identity has to come from
ksshaskpass itself.

Proposal: read /proc/<getppid()>/cmdline (the parent is the sudo/ssh/ssh-add
process that exec'd us) and show it in a collapsible "Details" area, leaving
the main prompt text untouched. Optionally add the systemd unit from
/proc/<getppid()>/cgroup. Both reads best-effort: on a restricted /proc or an
already-gone parent, fall back to today's dialog.

No change to sudo, ssh or the protocol needed. Complementary sudo-rs request to
also export SUDO_COMMAND to the askpass child:
https://github.com/trifectatechfoundation/sudo-rs/issues/1678

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to