cvs commit: src/bin/ls ls.1 ls.c

Ceri Davies ceri at submonkey.net
Thu Nov 10 19:23:29 GMT 2005


On Thu, Nov 10, 2005 at 07:49:26PM +0100, Maxime Henrion wrote:
> Ceri Davies wrote:
> > On Thu, Nov 10, 2005 at 12:02:32AM +0000, Maxime Henrion wrote:
> > > mux         2005-11-10 00:02:32 UTC
> > > 
> > >   FreeBSD src repository
> > > 
> > >   Modified files:
> > >     bin/ls               ls.1 ls.c 
> > >   Log:
> > >   Add a -I option to disable the automatic -A flag for the super-user.
> > >   
> > >   PR:             bin/86710
> > >   Submitted by:   Marcus Alves Grando
> > >   MFC after:      3 days
> > 
> > For what it's worth, I think mnag was right in the PR when he said that
> > this (at least the !getuid() bit) should be changed:
> > 
> > > | +	/* Root is -A automatically. */
> > > | +	if (!getuid() && !f_nolistdot)
> > > | +		f_listdot = 1;
> 
> I don't mind the change from if (!getuid()) to if (getuid() == 0) since
> it is more correct WRT style(9), but what was suggested in the PR by
> Giorgos (not mnag@) was to change all the if (!f_foo) and if (f_foo) to
> an "expanded" form.  Or at least this is what mnag@ did in his second
> patch.  Anyways, I don't think this is a reasonable change; the f_foo
> variables are really boolean and it's simpler if we treat them as is,
> and moreover, if people really want to do it this way, it can and should
> be done in a separate commit.
> 
> As for the getuid() condition, feel free to change it.

Sorry, that was the only one I cared about.

> > I'm also struggling for the motivation behind this option, but it
> > doesn't actually affect me in any way whatsoever so I can't complain.
> 
> It seems both weird and frustrating that this automatic -A option for root
> can't be disabled.  I personally don't mind it, but two different people
> requested this feature on IRC, plus a third one sent a patch to
> implement it so I don't see why it shouldn't get committed.  I'm
> actually rather annoyed to have to justify committing such a minor ~15
> lines patch.

I wasn't after justification.  I'm not sure how much more dismissive I
could have been.

Ceri
-- 
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20051110/5240f304/attachment.bin


More information about the cvs-src mailing list