Subject: bin/694: sh: warning: running as root with dot in PATH should only appar on tty
To: None <gnats-admin@NetBSD.ORG>
From: None <muir@idiom.com>
List: netbsd-bugs
Date: 01/03/1995 21:35:06
>Number: 694
>Category: bin
>Synopsis: 'sh: warning: running as root with dot in PATH' breaks scripts
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 3 21:35:02 1995
>Originator: David Muir Sharnoff
>Organization:
Idiom Consulting
>Release: 1.0
>Environment:
System: NetBSD again.idiom.com 1.0 NetBSD 1.0 (AGAIN) #2: Mon Jan 2 00:33:39 PST 1995 root@again.idiom.com:/usr/src/sys/arch/i386/compile/AGAIN i386
>Description:
While it is nice to try to make people's systems more secure, it
isn't polite to cause malfunctions in pursuit of this endevour.
The 'sh: warning: running as root with dot in PATH' warning message
is emmitted even when the output of the script is being captured
by another program. This breaks things.
While it isn't possible to truely know when it is safe to print
random garbage on the screen, there is a pretty easy test.
>How-To-Repeat:
As an example:
Try to run trn's Configure with as root with . in your path.
>Fix:
guard the printf with a call to isatty(3).
>Audit-Trail:
>Unformatted: