Skip to content

RFC client: double password prompt

James Prestwood iwd 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1client: fix double password promptclient/agent.c client/display.c client/display.h+10 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/1] client: double password prompt

I am sending this as an RFC as readline magic is not something I am at all familiar with. The patch seems to fix the issue, but its not exactly clear to me why. I would like to get eyes on this to ensure I'm not breaking something unrelated.

The documentation for rl_redisplay() says:

"Change what's displayed on the screen to reflect the current contents of rl_line_buffer."

My guess is that rl_line_buffer already contains the "Password:" prompt, and inside display_agent_prompt we call rl_redisplay, then set then rl_set_prompt which causes the duplicate. Removing rl_redisplay completely causes problems with single prompt scenarios like PSK networks so the only way to avoid the call in this multi prompt situation is to add a flag and let the caller decide.

James Prestwood (1):
client: fix double password prompt

 client/agent.c   | 10 +++++-----
 client/display.c |  6 ++++--
 client/display.h |  2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.26.2