From owner-freebsd-hackers Sun Jul 22 14:43:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.caldera.de (ns.caldera.de [212.34.180.1]) by hub.freebsd.org (Postfix) with ESMTP id 07FDA37B401; Sun, 22 Jul 2001 14:43:16 -0700 (PDT) (envelope-from hch@ns.caldera.de) Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id f6MLgYL08605; Sun, 22 Jul 2001 23:42:34 +0200 Date: Sun, 22 Jul 2001 23:42:34 +0200 From: Christoph Hellwig To: Terry Lambert Cc: Bruce Evans , Joshua Goodall , freebsd-fs@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: flags on symlinks Message-ID: <20010722234234.A7191@caldera.de> References: <3B5B2DBB.16B607E2@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B5B2DBB.16B607E2@mindspring.com>; from tlambert2@mindspring.com on Sun, Jul 22, 2001 at 12:47:07PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jul 22, 2001 at 12:47:07PM -0700, Terry Lambert wrote: > Bruce Evans wrote: > > > Is there a particular reason why there's no capability for setting flags > > > on symlinks? the chflags syscall uses namei with FOLLOW, and changing this > > > to NOFOLLOW allows chflags(2) to Do What I Want (i.e. SF_IMMUTABLE on a > > > VLNK) > > > Flags are associated with inodes, and symlinks do not have > inodes in the common case, as they exist solely in the > directory entry, unless they are too long. > Erm, Terry? In FFS and derived systems symlinks take an inode. In all other major filesystems I know, too. > Pretty clearly, there should _NOT_ be a seperate system call; > the damn thing should just work. Adding a seperate system call > means theaching everything that deals with flags about it (ls, > chflags, every FS supporing symlinks, etc.). I haven't looked at FreeBSD's namei algorihm in detail, but in theory it could easily do the access checks before calling VOP_READLINK. For the userspace tools: yes the two or three (you forgot at least mtree) the changes need to be done. If you know an idea that implements file flags on symlinks without that change please tell it. Christoph -- Whip me. Beat me. Make me maintain AIX. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message