Subject: weirdness with symlinks
To: None <current-users@netbsd.org>
From: Ken Hornstein <kenh@entropic.com>
List: current-users
Date: 10/09/1994 23:59:28
My /tmp is a MFS partition.  Tell me if this makes sense:

% ln -s /sys/arch/i386/isa/intr.c foo
% ls -l
0 lrwxrwxrwt  1 root  wheel  25 Oct  9 23:50 foo@ -> /sys/arch/i386/isa/intr
                ^^^^  ^^^^^
I thought maybe it was because the sticky bit was set, but that doesn't
seem to make a difference.

Hmmm, this seems to be done on purpose.  From /sys/ufs/ufs_vnops.c:

        if ((mode & IFMT) == IFLNK)
		ip->i_uid = pdir->i_uid;
	else
		ip->i_uid = cnp->cn_cred->cr_uid;

Ok, I guess this is deliberate ... anyone know why?  It doesn't seem to make
sense to me, but I admit there are lots of things about the filesystem code
that don't make sense to me. :-)

--Ken