NetBSD Problem Report #694

From gnats  Tue Jan  3 21:28:28 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id VAA13544 for <[email protected]>; Tue, 3 Jan 1995 21:28:26 -0800
Message-Id: <[email protected]>
Date: Tue, 3 Jan 1995 20:30:51 -0800
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: sh: warning: running as root with dot in PATH should only appar on tty
X-Send-Pr-Version: 3.2

>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
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 03 21:35:02 +0000 1995
>Closed-Date:    Sun Jan 15 09:42:18 +0000 1995
>Last-Modified:  
>Originator:     David Muir Sharnoff
>Release:        1.0
>Organization:
Idiom Consulting
>Environment:

System: NetBSD again.idiom.com 1.0 NetBSD 1.0 (AGAIN) #2: Mon Jan 2 00:33:39 PST 1995 [email protected]:/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).


	A more appropriate check would be whether or not the shell is
	interactive.  However, I've chosen to simply removing the warning
	completely.  - mycroft

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sun Jan 15 01:42:18 PST 1995 
State-Changed-Why:  
The warning has been removed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.