Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 1996 12:46:19 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        jmacd@CS.Berkeley.EDU (Josh MacDonald)
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: sticky directory symlinks
Message-ID:  <199601251946.MAA03106@phaeton.artisoft.com>
In-Reply-To: <199601250909.BAA19980@paris.CS.Berkeley.EDU> from "Josh MacDonald" at Jan 25, 96 01:09:28 am

next in thread | previous in thread | raw e-mail | index | archive | help
> axis-/tmp % ls -ld .
> drwxrwsrwt  4 root  wheel  512 Jan 25 00:46 ./
> axis-/tmp % ln -s this sucks
> axis-/tmp % ls -l sucks
> lrwxrwsrwt  1 root  wheel  4 Jan 25 00:46 sucks@ -> this
> axis-/tmp % rm sucks
> rm: sucks: Operation not permitted
> 
> /tmp is mode 1777 and when I create a symlink I can't remove it.
> I notice that the link shares the sticky dirs inode.  I think
> this is very very bad.  I guess that an optimization is made
> where the linkname is kept in the directory file instead of
> on disk but if its a sticky directory, then I can't remove 
> something I create.  That sucks a lot.  Has this been brought
> up before?

Yes, it has.

The change was intentional, and the side effects were known at the
time of the change.

This is not a "FreeBSD'ism", it's an inheritance from 4.4-Lite, and
saves an inode and sizof(frag) at a minimum, per symlink.

Consider the overall savings on a large news spool area, and you
may even agree that the cost is worth it.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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