Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!pur-ee!uiucdcs!bradley!bucc2!brian From: brian@bucc2.UUCP Newsgroups: comp.unix.questions Subject: Re: Three-way write Message-ID: <15100002@bucc2> Date: Tue, 27-Oct-87 13:28:00 EST Article-I.D.: bucc2.15100002 Posted: Tue Oct 27 13:28:00 1987 Date-Received: Sun, 1-Nov-87 03:14:58 EST References: <273@ddsw1.UUCP> Lines: 31 Nf-ID: #R:ddsw1.UUCP:273:bucc2:15100002:000:1395 Nf-From: bucc2.UUCP!brian Oct 27 12:28:00 1987 > /* Written 5:06 pm Oct 21, 1987 by sfsup.UUCP!mpl in bucc2:comp.unix.ques */ > Has anyone ever considered writing a "write" program that writes to ttys? > Amazingly enough, this is how the two way "write" program does it, and guess > what? It's portable! I know there are certain drawbacks, like each user ^^^^^^^^^^^^^^^^^ > must know all the other users in the conversation, but guess what? It's > portable. > > Sorry to sound facetious, but I'm sick of porting little programs like "this > does a cat backwards, and uses semaphores." Peace. > > Mike Lindner > attunix!mpl > /* End of text from bucc2:comp.unix.ques */ You sure are right there are certain drawbacks! In order to make the wonderful, standard, portable write command work everyone on the system has permission to write to your tty. Consider the implications of that. Novices troublemakers can have fun by doing things like cat a.out > /dev/tty101, and worse. People who know what they are doing can send wonderful control sequences to your terminal. Wonderful control sequences that will make the system think _you_ typed whatever _they_ want it to think. Like rm -r * ............................................................................... I heard it on the grep-vine... { bucs1!brian Brian Michael Wendt {uiucdcs,cepu,ihnp4}!bradley! { brian { bucc2!brian