Date: Tue, 28 Oct 1997 16:33:19 +0100 From: Wolfram Schneider <schneider@zib.de> To: Ollivier Robert <roberto@keltia.freenix.fr> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: disabled symlinks Message-ID: <199710281533.QAA04035@soft13.zib.de> In-Reply-To: <19971027001140.31561@keltia.freenix.fr> References: <199710261041.LAA00556@panke.panke.de> <19971027001140.31561@keltia.freenix.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
Ollivier Robert writes: >According to Wolfram Schneider: >> The nosymlink flag do not allow the creation of a symlink >> on the mounted file system. >Could you please modify your patch not to _follow_ symlinks in order to >disallow all symlinks in a given FS ? The patch return 'Permission denied' for symlinks in the kernel function namei/lookup. Index: vfs_lookup.c =================================================================== RCS file: /usr/cvs/src/sys/kern/vfs_lookup.c,v retrieving revision 1.11.4.1 diff -u -r1.11.4.1 vfs_lookup.c --- vfs_lookup.c 1996/12/03 15:48:25 1.11.4.1 +++ vfs_lookup.c 1997/10/27 14:51:56 @@ -493,6 +493,10 @@ ((cnp->cn_flags & FOLLOW) || trailing_slash || *ndp->ni_next == '/')) { cnp->cn_flags |= ISSYMLINK; + if (dp->v_mount->mnt_flag & MNT_NOSYMLINK) { + error = EACCES; + goto bad2; + } return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710281533.QAA04035>