Re: Proposal: restrict link(2)

Dan Merillat (Dan@merillat.org)
Fri, 13 Dec 1996 14:30:32 -0500 (EST)


On Fri, 13 Dec 1996, Steve VanDevender wrote:

> Date: Fri, 13 Dec 1996 09:56:25 -0800
> From: Steve VanDevender <stevev@efn.org>
> To: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
> Cc: Dan@merillat.org, galexand@sietch.bloomington.in.us,
> linux-kernel@vger.rutgers.edu
> Subject: Re: Proposal: restrict link(2)
>
> Harald Koenig writes:
> > * clobber other user's disk quoatas, disk usage and disk space accounting etc.
>
> No.
>
> $ mkdir tmp; cd tmp
> $ dd if=/dev/zero of=foo bs=1024 count=1024
> 1024+0 records in
> 1024+0 records out
> $ du
> 1030 .
> $ ln foo bar
> $ du
> 1030 .
> $ rm foo
> $ du
> 1030 .
>
> You have only a cursory understanding of how hard links work.

mkdir ~/killquota
chmod 700 ~/killquota
cd killquota
find ~victim/ | xargs -i ln \{\} .

Now, tell me that that dosn't screw up someones quota? They go over quota,
then CANNOT delete their files. If they zero them out they can reduce their
block count, but who zeros a file named "temp" that is 3-4 meg of strace logs?
you rm it right? Well if they do that then they are screwed, 'cause they
have now lost 3-4 meg of their quota.

We know quite well how hard links work, thanks anyway.

--Dan