Subject: bin/7713: you can wall while mesg n
To: None <gnats-bugs@gnats.netbsd.org>
From: David Holland <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 06/05/1999 14:27:27
>Number: 7713
>Category: bin
>Synopsis: you can wall while you have mesg n
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 5 14:20:00 1999
>Last-Modified:
>Originator: David A. Holland <dholland@eecs.harvard.edu>
>Organization:
- David A. Holland | VINO project home page:
dholland@eecs.harvard.edu | http://www.eecs.harvard.edu/vino
>Release: NetBSD 1.4
>Environment:
System: NetBSD bordeaux 1.4 NetBSD 1.4 (GENERIC) #0: Fri May 7 12:27:31 PDT 1999 perry@cynic.cynic.net:/usr/src/sys/arch/i386/compile/GENERIC i386
It does not appear to be any different in today's (6/5) current.
>Description:
If you mesg n, you can still wall, because wall seems to be
lacking a check for this.
Since you will see your own walls anyway (because your ttys
are owned by you and thus writable by your wall process), this
could lead to a good bit of confusion. It is also inconsistent
with write(1).
>How-To-Repeat:
mesg n
wall
>Fix:
Add check for your own tty being group writable, unless you're
root (in which case issuing a warning might be useful.) Using
stderr to get the tty is probably advisable, and if there
doesn't seem to be a tty it's probably better to let the wall
go through...
Will do patch if you like; let me know.
>Audit-Trail:
>Unformatted: