Subject: Re: wall and no tty
To: Christos Zoulas <>
From: Manuel Bouyer <>
List: tech-userlevel
Date: 10/26/2004 22:09:21
On Tue, Oct 26, 2004 at 07:21:28PM +0000, Christos Zoulas wrote:
> >Unfortunably this breaks warn when called from a script, which doesn't have a
> >tty (it will exit with "can't find your tty" error message). The attached
> >patch fix this, by not calling check_sender() if we're not on a tty.
> >
> >Is it OK to commit ?
> Let me fix it... Checking stdin is sub-optimal, because you can run
> foo < bar and it will lose.

Ha, yes.
But your fix isn't correct either; wall may be called from a script which
isn't run as root. I can't see why we should refuse to run wall for non-root
users which don't have a tty.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference