NetBSD Problem Report #847

From gnats  Tue Mar  7 05:08:19 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id FAA01088 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 7 Mar 1995 05:08:18 -0800
Message-Id: <199503071308.AAA11754@splode.mame.mu.OZ.AU>
Date: Wed, 8 Mar 1995 00:08:18 +1100
From: mrg@mame.mu.oz.au
Reply-To: mrg@mame.mu.oz.au
To: gnats-bugs@NetBSD.ORG
Subject: `ls' always root always turns on `-A'
X-Send-Pr-Version: 3.2@mame.mu.oz.au

>Number:         847
>Category:       bin
>Synopsis:       `ls' always root always turns on `-A'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 07 05:20:02 +0000 1995
>Closed-Date:    Thu Feb 08 23:05:03 +0000 1996
>Last-Modified:  Thu Feb 08 23:06:20 +0000 1996
>Originator:     matthew green
>Release:        1/3/95
>Organization:
bozotic softwar foundation
>Environment:
System: NetBSD splode.mame.mu.OZ.AU 1.0A NetBSD 1.0A (_splode_) #138: Tue Feb 28 01:53:15 EST 1995 mrg@splode.mame.mu.OZ.AU:/splode/build/src/sys/arch/sparc/compile/_splode_ sparc


>Description:

	as ls(1) turns on the -A flag when running as root, it is not
	possible to turn it off again.  this is undesireable.  wouldn't
	it be better to make ls(1) an alias in root's .cshrc to use
	this flag, thus keeping the current `semantics', but also giving
	people the choice if they so desired ?

>How-To-Repeat:
>Fix:

	add a line to root/.cshrc
	remove a couple of lines from src/bin/ls/ls.c and ls.1
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->suspended
State-Changed-By: jtc
State-Changed-When: Thu Mar 16 22:12:19 1995
State-Changed-Why:
This is traditional behavior.

State-Changed-From-To: suspended->closed 
State-Changed-By: mycroft 
State-Changed-When: Thu Feb 8 18:05:03 EST 1996 
State-Changed-Why:  
Per previous comments, this behaviour is intentional. 
>Unformatted:
 >I asked Keith Bostic about this behavior.  His response indicated that
 >it's been that way since before 'alias' existed!
 >
 >The fact that it works this way is (and apparently historically has
 >been) documented, and, though i don't have any of the relevant
 >standards docs around, i could even believe that it was standardized.  8-)
 >
 >That means that, at least in my opinion, it'd be dangerous to remove it.
 >There are probably a lot of root-run administrative scripts of various
 >types out there that depend on 'ls', for root, being 'ls -A'...

 jtc says:
 > This behavior is allowed, but not required, by POSIX.2.  It is probably
 > mandated by SVID and XPG.  




 cgd says:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.