From owner-freebsd-fs Fri Oct 31 05:29:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA05189 for fs-outgoing; Fri, 31 Oct 1997 05:29:10 -0800 (PST) (envelope-from owner-freebsd-fs) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA05180 for ; Fri, 31 Oct 1997 05:29:06 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id AAA17135; Sat, 1 Nov 1997 00:25:57 +1100 Date: Sat, 1 Nov 1997 00:25:57 +1100 From: Bruce Evans Message-Id: <199710311325.AAA17135@godzilla.zeta.org.au> To: Don.Lewis@tsc.tdk.com, wosch@cs.tu-berlin.de Subject: Re: disabled symlinks Cc: freebsd-fs@FreeBSD.ORG, roberto@keltia.freenix.fr Sender: owner-freebsd-fs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> } diff -u -r1.51.2.6 vfs_syscalls.c >> } --- vfs_syscalls.c 1997/10/23 18:04:55 1.51.2.6 >> } +++ vfs_syscalls.c 1997/10/30 22:24:47 >> } @@ -1326,8 +1328,10 @@ >> } return (error); >> } vp = nd.ni_vp; >> } error = vn_stat(vp, &sb, p); >> } - if (vp->v_type == VLNK) >> } + if (vp->v_type == VLNK && >> } + (vp->v_mount->mnt_flag & MNT_NOSYMLINKFOLLOW) != 0) > ^^ > >> This test looks backwards to me (it changes the behavior if the >> new nosymlinkfollow option is not set). I'm also not clear as >> to why the behaviour even depends on the option. It's also wrong because it breaks the setting of S_IFLNK. >vfs_syscalls.c rev 1.62 >Symlinks do not have modes though, they are accessable to everything that >can read the directory (as before). They are made to show this fact at >lstat time (they appear as mode 0777 always, since that's how the the >lookup routines in the kernel treat them). This seems OK. >> Also, shouldn't >> the same change be made to both lstat() and olstat()? > >This is a cosmetic change. I don't think we should change >old system calls if it is not necessary. I doubt that anybody >use an old ls(1) command. Old syscalls should work as consistently as possible if they are supported. Bruce