monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] MacOSX terminal does not allow me to enter passphra


From: Nathaniel Smith
Subject: Re: [Monotone-devel] MacOSX terminal does not allow me to enter passphrase
Date: Thu, 20 Oct 2005 19:05:31 -0700
User-agent: Mutt/1.5.9i

On Fri, Oct 14, 2005 at 11:03:13PM +0200, Wim Oudshoorn wrote:
> 
> Not sure what is wrong, but the following monotone command gives me
> troubles:
> 
>    monotone cert 2c4 test-cert-1
> 
> It shows on the terminal
> 
>    monotone: expanded selector '2c4' -> 'i:2c4'
>    monotone: expanding selection '2c4'
>    monotone: expanded to '2c4681f8bef0783c5cb0e1be092fc93e58907dd4'
>    *
> 
> With the cursor shown at the * location.
> If I press enter I the screen looks like:
> 
>    monotone: expanded selector '2c4' -> 'i:2c4'
>    monotone: expanding selection '2c4'
>    monotone: expanded to '2c4681f8bef0783c5cb0e1be092fc93e58907dd4'
>    
>    enter passphrase for key ID address@hidden: 
>    monotone: empty passphrase not allowed
>    enter passphrase for key ID address@hidden: 
>    monotone: empty passphrase not allowed
>    enter passphrase for key ID address@hidden: 
>    monotone: empty passphrase not allowed
>    monotone: misuse: no passphrase given
>    nelly:~/src/em-a woudshoo$ 

Just looked at this again.  It seems to be a small, funky bug in
monotone.

If you pass only 2 arguments to 'cert', it reads stdin to get the
actual contents of the cert.  It's not waiting for your password; it's
waiting for stdin to report end-of-file (e.g., by you pressing ^D).

However, I guess using 'cin' to read the contents of stdin is a bit of
a problem, since I think istreams will never become valid to read
after they have reported EOF, but the actual semantics of a tty
are that it _can_ become readable again after reporting EOF?  I'm not
quite sure what should be done here; even if we fix the problem so you
can hit ^D and then enter your passphrase, a stdin-slurping interface
that can only be used effectively when stdin is a tty is sort of
pointless...

I guess there are weird options -- what does ssh do to find the tty
for passphrases?  Pick the first fd out of 0, 1, 2 that isatty, and
read&write from there?

The workaround, of course, is to pass the contents of the cert in the
third argument...

-- Nathaniel

-- 
Sentience can be such a burden.




reply via email to

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