Re: Call for review: restricted hardlinks.
From: Tim Robbins (tjr_at_freebsd.org)
Date: Mon, 8 Mar 2004 21:25:55 +1100 To: Pawel Jakub Dawidek <firstname.lastname@example.org>
On Mon, Mar 08, 2004 at 10:36:42AM +0100, Pawel Jakub Dawidek wrote:
> I've no response from so@ in this topic, probably because leak of time,
> so I'll try here.
> Here is a patch that I'm planing to commit:
> It adds two new sysctls:
> If sysctl security.bsd.hardlink_check_uid is set to 1, unprivileged users
> are not permitted to create hard links to files not owned by them.
> If sysctl security.bsd.hardlink_check_gid is set to 1, unprivileged users
> are not permitted to create hard links to files if they are not member
> of file's group.
> For now user is able to create hardlinks to any files.
It might be more consistent with other UNIX access checks (e.g. vaccess())
if having the same uid as the file was sufficient to link to it,
without having to be a group member. I can't convince myself either way
on this, but it's worth thinking about.
Also be aware that as a side effect of this patch, old applications that use
the unlink()/link()/unlink() sequence instead of the rename() system call
may not be able to rename files they don't own.
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"