[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0704270859520.506@yvahk01.tjqt.qr>
Date: Fri, 27 Apr 2007 09:01:44 +0200 (MEST)
From: Jan Engelhardt <jengelh@...ux01.gwdg.de>
To: Miklos Szeredi <miklos@...redi.hu>
cc: ebiederm@...ssion.com, akpm@...ux-foundation.org, serue@...ibm.com,
viro@....linux.org.uk, linuxram@...ibm.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
containers@...ts.osdl.org, hpa@...or.com
Subject: Re: [patch] unprivileged mounts update
On Apr 26 2007 22:27, Miklos Szeredi wrote:
>> On Apr 25 2007 11:21, Eric W. Biederman wrote:
>> >>
>> >> Why did we want to use fsuid, exactly?
>> >
>> >- Because ruid is completely the wrong thing we want mounts owned
>> > by whomever's permissions we are using to perform the mount.
>>
>> Think nfs. I access some nfs file as an unprivileged user. knfsd, by
>> nature, would run as euid=0, uid=0, but it needs fsuid=jengelh for
>> most permission logic to work as expected.
>
>I don't think knfsd will ever want to call mount(2).
I was actually out at something different...
/* Make sure a caller can chown. */
if ((ia_valid & ATTR_UID) &&
(current->fsuid != inode->i_uid ||
attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN))
goto error;
for example. Using current->[e]uid would not make sense here.
>But yeah, I've been convinced, that using fsuid is the right thing to
>do.
Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists