diff --git a/xpra/scripts/pinentry_wrapper.py b/xpra/scripts/pinentry_wrapper.py index 3bcbf1cab4..9d96e54b02 100755 --- a/xpra/scripts/pinentry_wrapper.py +++ b/xpra/scripts/pinentry_wrapper.py @@ -19,7 +19,7 @@ from xpra.exit_codes import EXIT_UNSUPPORTED from xpra.log import Logger -log = Logger("exec") +log = Logger("exec", "auth") SKIP_UI = envbool("XPRA_SKIP_UI", False) PINENTRY = envbool("XPRA_SSH_PINENTRY", POSIX and not OSX) @@ -82,7 +82,8 @@ def do_run_pinentry(proc, get_input, process_output): while proc.poll() is None: try: line = proc.stdout.readline() - process_output(message, line) + while process_output(message, line): + pass message = get_input() if message is None: break @@ -110,6 +111,10 @@ def get_input(): return messages.pop(0) def process_output(message, output): if message=="GETPIN": + if output.startswith(b"S "): + log("getpin message: %s", bytestostr(output[2:])) + #ie: 'S PASSWORD_FROM_CACHE' + return True #read more data if output.startswith(b"D "): pin_value = output[2:].rstrip(b"\n\r").decode() pin_cb(pin_value)