Date: Thu, 30 Oct 1997 17:11:23 -0800 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: Wolfram Schneider <wosch@cs.tu-berlin.de>, Ollivier Robert <roberto@keltia.freenix.fr> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: disabled symlinks Message-ID: <199710310111.RAA02224@salsa.gv.tsc.tdk.com> In-Reply-To: Wolfram Schneider <wosch@cs.tu-berlin.de> "Re: disabled symlinks" (Oct 31, 12:13am)
next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 31, 12:13am, Wolfram Schneider wrote: } Subject: Re: disabled symlinks } Index: sys/kern/vfs_syscalls.c } =================================================================== } RCS file: /usr/cvs/src/sys/kern/vfs_syscalls.c,v } retrieving revision 1.51.2.6 } 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. Also, shouldn't the same change be made to both lstat() and olstat()? } sb.st_mode |= S_IFLNK | ACCESSPERMS; /* 0777 */ } + } vput(vp); } if (error) } return (error); --- Truck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710310111.RAA02224>