From owner-cvs-all Wed Dec 18 16:29:50 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C048537B401; Wed, 18 Dec 2002 16:29:48 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BD4B43E4A; Wed, 18 Dec 2002 16:29:48 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBJ0Tdxf039108; Wed, 18 Dec 2002 19:29:45 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 18 Dec 2002 19:29:39 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, tjr@FreeBSD.org Subject: Re: cvs commit: src/bin/ls ls.c In-Reply-To: <20021219105457.U28005-100000@gamplex.bde.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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