monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] rfc: new password prompter (unix-only)


From: Zack Weinberg
Subject: [Monotone-devel] rfc: new password prompter (unix-only)
Date: Mon, 7 May 2007 11:41:50 -0700

On net.venge.monotone.read-password-from-dev-tty you will find a
reimplemented unix/read_password.cc.  This represents a few hours'
hacking while stuck in the airport on Saturday, and it does two
things.  First, it implements the Unix best practice of reading the
password from /dev/tty when available, instead of stdin - this breaks
the testsuite, I'm not sure exactly what to do about that yet,
possibly a --passphrase-fd option a la gpg.  Second, I made it move
the cursor back and forth (without printing anything) as the user
types.  I did this mainly because I was bored, but I do think it's
better UI; it makes clear that, for instance, backspace works.
However, it is not the standard Unix thing, and I'm open to arguments
that it should not be done.  I'm also open to arguments of the form
"that's a good idea but OMGZ why did you implement it like that?!"...

Also, it needs test cases (in addition to fixing the test cases it
breaks), and for that we need to mess around with pseudoterminals in
the test suite.  Left to my own devices, I will probably use expect
and skip those tests if the user doesn't have it, but yanno, if
someone wants to add pty support to tester.cc, be my guest :-)

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]