From: NeilBrown <neilb@suse.com>
To: Jan Harkes <jaharkes@cs.cmu.edu>, David Howells <dhowells@redhat.com>
Cc: dhowells@redhat.com, "J. Bruce Fields" <bfields@fieldses.org>,
Anna Schumaker <anna.schumaker@netapp.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
linux-nfs@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
Jeff Layton <jlayton@kernel.org>,
linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org,
coda@cs.cmu.edu, linux-fsdevel@vger.kernel.org,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/3] VFS: introduce MAY_ACT_AS_OWNER
Date: Fri, 05 Oct 2018 07:55:39 +1000 [thread overview]
Message-ID: <877eixtm04.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <3D5BB0E9-E43C-43D1-86E9-96E409A17D54@cs.cmu.edu>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
On Thu, Oct 04 2018, Jan Harkes wrote:
> Same for Coda.
>
> uid/gid/mode don't mean anything, access is based on the directory ACL and the authentication token that is held by the userspace cache manager and ultimately decided by the servers.
>
> Unless someone broke this recently and made permission checks uid based I would expect no change. If this is broken by a recent commit I expect something similar to what NFS is trying to do by allowing the actual check to be passed down.
As with afs, the only permission check I can find that is uid based and
which actually affects coda is the check for use fcntl(F_SETFL) to set
O_NOATIME. I suspect that is irrelevant for coda.
I'll resubmit with the same code for both NFS and code - and probably
AFS.
Thanks,
NeilBrown
>
> Jan
>
> On October 4, 2018 10:10:13 AM EDT, David Howells <dhowells@redhat.com> wrote:
>>NeilBrown <neilb@suse.com> wrote:
>>
>>> diff --git a/fs/afs/security.c b/fs/afs/security.c
>>> index 81dfedb7879f..ac2e39de8bff 100644
>>> --- a/fs/afs/security.c
>>> +++ b/fs/afs/security.c
>>> @@ -349,6 +349,16 @@ int afs_permission(struct inode *inode, int
>>mask)
>>> if (mask & MAY_NOT_BLOCK)
>>> return -ECHILD;
>>>
>>> + /* Short-circuit for owner */
>>> + if (mask & MAY_ACT_AS_OWNER) {
>>> + if (inode_owner_or_capable(inode))
>>
>>You don't know that inode->i_uid in meaningful. You may have noticed
>>that
>>afs_permission() ignores i_uid and i_gid entirely. It queries the
>>server (if
>>this information is not otherwise cached) to ask what permits the user
>>is
>>granted - where the user identity is defined by the key returned from
>>afs_request_key()[*].
>>
>>So, NAK for the afs piece.
>>
>>David
>>
>>[*] If there's no appropriate key, anonymous permits will be used.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-10-05 4:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 1:02 [PATCH 0/3] Fix regression in NFSv3 ACL setting NeilBrown
2018-10-04 1:02 ` [PATCH 3/3] NFSD - Use MAY_ACT_AS_OWNER NeilBrown
2018-10-04 1:02 ` [PATCH 1/3] VFS: introduce MAY_ACT_AS_OWNER NeilBrown
2018-10-04 1:02 ` [PATCH 2/3] VFS: allow MAY_ flags to be easily extended NeilBrown
2018-10-04 2:11 ` [PATCH 2/3 v2] " NeilBrown
2018-10-04 14:10 ` [PATCH 1/3] VFS: introduce MAY_ACT_AS_OWNER David Howells
2018-10-04 14:42 ` Jan Harkes
2018-10-04 21:55 ` NeilBrown [this message]
2018-10-04 21:52 ` NeilBrown
2018-10-04 22:50 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877eixtm04.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=coda@cs.cmu.edu \
--cc=dhowells@redhat.com \
--cc=hch@lst.de \
--cc=jaharkes@cs.cmu.edu \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=trond.myklebust@hammerspace.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).