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

On Fri, 13 Dec 1996, Steve VanDevender wrote:

> "And therefore modify?" I get the impression that some of the people
> who are arguing about this don't at all understand the semantics of
> link().
> If you link /etc/shadow to /tmp/shadow, you have done none of the
> following:
> * changed the permissions of /tmp/shadow
> * changed the owner or group owner of /tmp/shadow
> Not only have you not changed those, you cannot change those. You have
> created another reference to the inode, and that's all.

Theodore Y. Ts' <tytso@MIT.EDU> Writes:

> Incorrect. Being able to link to a file does not mean you can change
> it.

Sheesh. I said link() modifies a file. And it _DOES_ It changes the file
location, which _MAY_ change permissions of that file! (think of a group-only
directory and someone in that group makes a link outside of it)

It changes the lifespan of the file.
It takes control of the file away from the owner, who can no longer delete
the file.
link() in a directory you own, mode 700. Now the owner _CANNOT_
touch the file after they remove it! So yes, link() DOES modify a file
and nobody can claim it does not!


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