[4394] in bugtraq

home help back first fref pref prev next nref lref last post

Re: Digital UNIX/Irix mesg problem

daemon@ATHENA.MIT.EDU (Andrew Snare)
Fri May 2 01:55:21 1997

Date: 	Thu, 1 May 1997 14:33:22 +1000
Reply-To: Andrew Snare <earthpig@YOYO.CC.MONASH.EDU.AU>
From: Andrew Snare <earthpig@YOYO.CC.MONASH.EDU.AU>
X-To:         John Sheehy <jes@GROVE.UFL.EDU>
To: BUGTRAQ@NETSPACE.ORG
In-Reply-To:  "Your message of Tue, 29 Apr 1997 18:35:04 -0400." 
              <Pine.OSF.3.95.970429182405.14400Q-100000@bay>

-----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-----

home help back first fref pref prev next nref lref last post