From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:57382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeJEFqQ (ORCPT ); Fri, 5 Oct 2018 01:46:16 -0400 From: David Howells In-Reply-To: <87a7nttm5o.fsf@notabene.neil.brown.name> References: <87a7nttm5o.fsf@notabene.neil.brown.name> <153861496327.30373.10501882399296347125.stgit@noble> <153861471803.30373.6184444014227748848.stgit@noble> <28763.1538662213@warthog.procyon.org.uk> To: NeilBrown Cc: dhowells@redhat.com, "J. Bruce Fields" , Anna Schumaker , Alexander Viro , Trond Myklebust , Jan Harkes , linux-nfs@vger.kernel.org, Miklos Szeredi , Jeff Layton , linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org, coda@cs.cmu.edu, linux-fsdevel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH 1/3] VFS: introduce MAY_ACT_AS_OWNER MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2792.1538693434.1@warthog.procyon.org.uk> Date: Thu, 04 Oct 2018 23:50:34 +0100 Message-ID: <2793.1538693434@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: NeilBrown wrote: > Thanks for the review. > As afs doesn't use the generic xattr code and doesn't call > setattr_prepare(), this is all largely irrelevant for afs. Yeah - there's no xattr support yet. > afs_permission() will probably only get MAY_ACT_AS_OWNER passed when > someone uses fcntl(F_SETFL) to set the O_NOATIME flag. There's no atime in AFS. > Currently a permission test based on UID is performed which, as you say, > is wrong. My patch simply preserved this current (wrong) behaviour. > Shall I change it to always allow access, like with NFS? You have to have an appropriate key to be able to do anything not granted to anonymous with the server. If the server says your key (or lack thereof) is allowed to do something, you can do it; if it does not, you can't. > Probably O_NOATIME is ignored, in which case f_op->check_flags should > probably report -EINVAL (???) ... or might that cause a regression? No atime. I just ignore things like O_NOATIME. You will be able to query the filesystem with fsinfo() hopefully soon to find out if there is an atime and if you can disable it. Davod