[rancid] hpuifilter - TTY support (for SSH)

David Luyer david+rancid at luyer.net
Fri Sep 5 17:31:34 UTC 2008


G'day,

As has been mentioned on this list in the (distant?) past, hpuifilter
often does not work properly with SSH, as SSH will attempt to read the
password from /dev/tty which will sometimes successfully get the password
from the expect script, but sometimes the hpuifilter process will drain
this password out of the TTY before the SSH process gets it, and write
it to the SSH process STDIN, resulting in the SSH process hanging (waiting
for the password on it's /dev/tty file descriptor).  For more hilarity,
often the SSH process gets the first character or two via /dev/tty, and
the hpuifilter process gets the rest and passes it in via STDIN.

Fortunately, this is relatively easily solved.  The attached patch adds
a "-t" option to hpuifilter, which makes it use its own TTY.

This means you end up burning two TTYs when talking to a HP via SSH (one
for expect, one for hpuifilter), so you want to make sure you only use
this option for HPs you're using SSH with, and not HPs you're using telnet
with.

Anyway: please find patch attached.

Thanks,
David.
-- 
David Luyer
Google, Inc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hpuifilter.patch
Type: text/x-patch
Size: 2378 bytes
Desc: not available
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20080905/7ccb1a8b/attachment.bin 


More information about the Rancid-discuss mailing list