Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Nov 1997 00:25:57 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        Don.Lewis@tsc.tdk.com, wosch@cs.tu-berlin.de
Cc:        freebsd-fs@FreeBSD.ORG, roberto@keltia.freenix.fr
Subject:   Re: disabled symlinks
Message-ID:  <199710311325.AAA17135@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> } 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710311325.AAA17135>