Subject: Re: bin/847: `ls' always root always turns on `-A'
To: None <mrg@mame.mu.OZ.AU>
From: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
List: netbsd-bugs
Date: 03/07/1995 09:08:30
> 	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 ?

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'...


Some humorous notes about the documentation of 'ls -A' on various
systems:
	The NetBSD man page says that -A is on for root.
	The OSF/1 man page says that -A is on for root.
	Neither SunOS nor Ultrix document -A at all (but both accept it).
	The HP/UX man page says:
		For the user with appropriate privileges, this flag
		defaults to ON , and is turned off by -A.

I find the way HP worded it... amusing.  (i also think that turning it
off with -A is... less than intuitive.)


(i've included some of my comments in the pr, but not changed its
status.)


chris