Bug#66740: ssh-askpass-gnome: The first password is always bad (was: OpenSSH 3.0)
Charles C. Fu
ccwf at bacchus.com
Wed Dec 19 11:45:54 EST 2001
In <Pine.LNX.4.33.0112111649370.20647-100000 at mothra.mindrot.org>
on 10 Dec 2001, djm at mindrot.org <djm at mindrot.org> wrote:
> Please report future portable OpenSSH bugs at
> http://bugzilla.mindrot.org/ - it makes them easier to track.
Sorry, is the URL above in the documentation? I didn't see it and so
didn't know about it.
> Could you try this patch?
Patch appears to work fine, enabling a two write passphrase to be
read. I tested with SSH_ASKPASS set to the following simple script
#!/bin/sh -
echo -n '<passphrase>'
sleep 6
echo
and verified using gdb that the new logic now reads all the characters
written. I have not regression tested to be sure the new code still
handles the passphrase >= sizeof buf case (readpass v1.23), but the
code looks visually OK to me.
As a side note, I don't think the memset at the end is necessary,
although we were fortunate before that it happened to let ssh-add
function properly the second time the passphrase was read (because the
memset had zeroed that area of the stack and nothing else overwrote it
between the calls to ssh_askpass).
-ccwf
More information about the openssh-unix-dev
mailing list