Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


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

What's a good Java mailing list?



Adam Russell writes:

> Apparently the difference is that some programs like ssh(maybe yours
> too?) do not read from stdin but, rather, "the terminal". Now, my
> system programming experience is limited so I am not quite sure what
> "reading from the terminal means". Does that mean that it uses
> something like ncurses to read input? If so, how is that different
> than just reading stdin besides just wrapping it in someway? If
> soneoen could care to explain it to me that would be cool. Always
> sort of wondered.......

This is a FAQ in some places.

The thing that you are alluding to here is that some programs happily
read from stdin wheras others (most famously the passwd program) go to
the trouble of reading from the controlling terminal (/dev/tty).  It's
not really a ncurses thing.

All of this is done for "security reasons", but I have to confess I
don't understand these anymore since (1) Expect is nearly ubiquitous
nowadays (2) it isn't impossible to write pty code (nefarious or not)
(3) many modern versions of tools like passwd give you the option of
reading from stdin anyways and (4) if you're stupid enough to use such
a feature and leave whatever scripts/etc. that drive this program in
cleartext, then you'll eventually get what you richly deserve.

The OP didn't mention that his program was reading directly from
/dev/tty, so I doubt that this is relevant to the problem.  I'm not
sure what the problem is at this point either.

Regards,

--kevin  (changing into his light asbestos underwear right now)
-- 
GnuPG ID: B280F24E                     And the madness of the crowd
alumni.unh.edu!kdc                     Is an epileptic fit
                                       -- Tom Waits




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org