lkml.org 
[lkml]   [1999]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Rights for hardlinks

On Tue, 23 Mar 1999, Jan Kara wrote:

> Hello.
>
> A few days ago I found out an unpleasant thing about hardlinks. See
> the following situation:
> Lets have an innocent user A and evil user B. The user B writes
> a program which will watch for example /tmp directory (or any directory
> he has a read access to) and every file of user A hardlinks to some
> other directory. Now user A can't effectively delete the file which is
> especially unpleasant when there is quota on this system. The best
> thing (OK after writing a system administrator) he can do is to truncate
> the files but then he will sooner or later exceed inde quota. And usually
> normal user won't notice anything till the quota will be exceeded...
And such activity is the perfect ground for account termination.

> So I thing it would be good if hardlinks would be allowed only on files
> the user has write access to. I've consulted the Single Unix specification
> and I thing this behaviour is possible. There si witten:

And so you'll have to play with permissions to make a link to your
r--r--r-- file. Great idea. Not.

> The implementation may require that the calling process has
> permission to access the existing file.
Access != write permissions.

> So do you thing it has a sence and is possible to change the current
> behaviour?
IMO it's madness. If you are in hostile environment (malicious
local users) you can (and should) make your homedir accessible only for
you. The only other place you could care of is /tmp. Needs regular
cleanups on any box.
Notice that malicious user can simply *open* the files and there
is nothing you can do with them. Even if you unlink them they'll stay
around until the attacker will want to close them. Your point being?
Uptimes up to hundreds of days are *good* thing on a multi-user box.
It's a topic of regular flamewars in comp.unix.* - looks like it's
l-k turn. Sigh...



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.151 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site