[1553] in Athena Bugs
6.0R: /usr/bin/mesg
daemon@ATHENA.MIT.EDU (probe@ATHENA.MIT.EDU)
Sat Dec 17 09:47:58 1988
From: <probe@ATHENA.MIT.EDU>
Date: Sat, 17 Dec 88 09:47:40 EST
To: henry@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
Reply-To: Richard Basch <probe@ATHENA.MIT.EDU>
/usr/bin/mesg n does not turn off the world-writeable aspect of the tty.
The problem is that under some circumstances, the tty is left
world-writeable (I believe xterm does this).
Proof:
e40-355-1% ls -lg `tty`
crw--w---- 1 stdout tty 6, 0 Dec 17 09:37 /dev/ttyp0
e40-355-1% chmod a+w !$
chmod a+w `tty`
e40-355-1% ls -lg !$
ls -lg `tty`
crw--w--w- 1 stdout tty 6, 0 Dec 17 09:37 /dev/ttyp0
e40-355-1% /usr/bin/mesg n
e40-355-1% ls -lg `tty`
crw-----w- 1 stdout tty 6, 0 Dec 17 09:37 /dev/ttyp0
e40-355-1% whoami
stdout
e40-355-1% machtype
rt
e40-355-1%
The reason that I had to do the chmod originally was that I telnetted
in, so the permissions were set right. If it had been "xterm", the tty
would have been world-writeable to begin with. This RT is almost
completely standard (the few things that aren't are to make it an RVD
server).
Now for the VAX side:
repoman% whoami
stdout
repoman% machtype
vax
repoman% ls -lg `tty`
crw--w---- 1 stdout 101 20, 0 Dec 17 09:42 /dev/ttyp0
repoman% chmod a+w !$
chmod a+w `tty`
repoman% !ls
ls -lg `tty`
crw--w--w- 1 stdout 101 20, 0 Dec 17 09:43 /dev/ttyp0
repoman% /usr/bin/mesg n
repoman% !ls
ls -lg `tty`
crw-----w- 1 stdout 101 20, 0 Dec 17 09:43 /dev/ttyp0
repoman%
Also, notice that the group ownership of the tty was gid 101 (mit); no
"chgrp" commands were performed by me.
-Richard