Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2002 19:29:39 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, tjr@FreeBSD.org
Subject:   Re: cvs commit: src/bin/ls ls.c
Message-ID:  <Pine.NEB.3.96L.1021218192820.32670E-100000@fledge.watson.org>
In-Reply-To: <20021219105457.U28005-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, 19 Dec 2002, Bruce Evans wrote:

> On Wed, 18 Dec 2002, Robert Watson wrote:
> 
> > rwatson     2002/12/18 13:05:15 PST
> >
> >   Modified files:
> >     bin/ls               ls.c
> >   Log:
> >   Improve handling of symlink targets when listing MAC labels: don't
> >   do the wrong thing when the symlink doesn't have a target, by
> >   considering !f_label in the construction of ch_options.
> 
> ls still seems to do the wrong thing for symlinks without targets:
> 
>     $ ls -l /etc/malloc.conf
>     ls: /etc/malloc.conf: No such file or directory
>     lrwxrwxrwx  1 root  wheel  2 Jun 29 00:36 /etc/malloc.conf -> aj
> 
> The RELENG_4 ls run on -current works like I expect:
> 
>     $ /d/tmp/ls/ls -l /etc/malloc.conf
>     lrwxrwxrwx  1 root  wheel  2 Jun 29 00:36 /etc/malloc.conf -> aj
> 
> The spurious warning is printed by aclmode() after pathconf() fails. 
> pathconf() follows symlinks so it cannot work correctly here unless ls
> is following symlinks. 

Sounds like we need some form of lpathconf(), or we need to ignore ACL
stuff for the purposes of symlinks.  Given that we don't currently have
system calls to manipulate ACLs on symlinks (it's actually on a todo list
somewhere, but was low priority), this may be the best option.  I've CC'd
Tim since he did the ACL ls changes.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1021218192820.32670E-100000>