lkml.org 
[lkml]   [1996]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Proposal: restrict link(2)



On Fri, 13 Dec 1996, Nicholas J. Leon wrote:

> Date: Fri, 13 Dec 1996 13:36:39 -0500 (EST)
> From: "Nicholas J. Leon" <lists-nicholas@binary9.net>
> To: Steve VanDevender <stevev@efn.org>
> Cc: linux-kernel@vger.rutgers.edu
> Subject: Re: Proposal: restrict link(2)
>
>
> Steve VanDevender was overheard whispering ...
> #
> #
> # 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.
> #
>
> Your example doesn't demostrate that if:
>
> user1 $ dd if=/dev/zero of=foo bs=1k count=1k
> # repquota -a | grep user1
> user1 -- 1029 0 0 1 0 0
> user2 $ ln ~user1/foo ~/bar
> user1 $ rm foo
> # repquota -a | grep user1
> user1 -- 1029 0 0 1 0 0
>
> at this point the quota's for user1 still show the usage, as they
> should considering the blocks are still allocated. So user2 could fill
> user1's quotas by hard linking foo as many times as needed.

Not quite... but you can give them a minimum limit on their quota by linking
their files. When you link foo 3 times and they delete it, there are still
only the number of blocks in foo used... with three pointers.

however, linking foo, bar, baz etc will make those files undeletable.

Since this is a quota issue, let's just focus on that: If QUOTA's are
enabled, we restrict hard link to the owner. Otherwise quota is non-viable.

--Dan


\
 
 \ /
  Last update: 2005-03-22 13:38    [from the cache]
©2003-2011 Jasper Spaans