Re: Can't hardlink in different dirs. (BUG#826)

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Sun, 05 Dec 1999 13:25:46 -0300


Pavel Machek <pavel@suse.cz> said:
[That was a bit of exessive crossposting, IMHO]
> In-Reply-To: <Pine.LNX.4.10.9912030145450.16982-100000@alpha.random>; from Andr
> ***ea Arcangeli on Fri, Dec 03, 1999 at 01:48:01AM +0100

> > >Don't bring the policy question into the kernel. If you want to kill the
> > >contents of inode - unlink() is _not_ a way to go. truncate() is.

> > What have unlink() or truncate() to do with this issue? The only system
> > call we are talking about is _link_(2).

> He's telling you to use > $1; rm $1 instead of plain rm $1. That works
> in both cases (suid programs and quota being exceeded).

Won't affect inode quota overruns; blows away the file even if there are
legitimate hardlinks to it.

> You might want to put file called rm containing this

> #!/bin/bash
> > $1; rm $1
>
> on your search path.

Nice infinite recursion, that one ;-)

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/