Re: Digital UNIX/Irix mesg problem

Andrew Snare (earthpig@YOYO.CC.MONASH.EDU.AU)
Thu, 01 May 1997 14:33:22 +1000

-----BEGIN PGP SIGNED MESSAGE-----

John Sheehy recently penned:
/*
* On Tue, 29 Apr 1997, Tom Leffingwell wrote:
*
* | This is rather stupid and not much of a bug, but it shouldn't
* | happen. Basically, the permissions on your tty are set correctly, with
* | messages on, during login. If you turn them off, and then turn them back
* | on, your tty becomes world writable. (Actually, you don't have to turn
* | them off, mesg y automatically sets permissions that way). I don't
* | remember that being that way in Digital UNIX 3, but I can't think of a box
* [...]
*
* On Digital Unix 3.2D-1:
[results snipped]
* OSF1 ns V3.2 62 alpha
[and again]
* This is rather annoying. Time to write a script to replace mesg.
*/

Yep, it is annoying. In writing such a script I also found that screen
(when running suid root) also sets the owner of the pseudo-tty's it
allocates to have the wrong owning group -- it sets the owning group to be
the primary group the user is in, not the terminal group. This means that
for write to work mesg y must indeed make the group world-writeable. My
solution has been to just detect the owning group. If it's not terminal,
spit out a warning message and revert to the old buggy behaviour. YMMV.

- Andrew

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBM2gdDj9oumhqYnjxAQFSoQP+PHn9Cg/G4MwoA2y4LKcWSjPIMEFfPloj
Qz+e+6KNHaM+vs0MKzL3O/lW2BKPKNemTAYe1z94xzzG6063BOPUnINk74HcKMZT
KaNAKc3yFqye08m39MQK7VgJhxNr7+N/q38PE6w279PwHC5zvniG9CnuE5nfQYwT
S5b5ss3bBVQ=
=jMuQ
-----END PGP SIGNATURE-----