Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp28450imm; Thu, 4 Oct 2018 14:57:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV614Et+KmxejoSvuf68u3CDEovdtozMMSP2uG1U85D1SXKMM9HGVn722ViLSThwu+WHp6bxu X-Received: by 2002:a63:6c4a:: with SMTP id h71-v6mr6301906pgc.326.1538690258644; Thu, 04 Oct 2018 14:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538690258; cv=none; d=google.com; s=arc-20160816; b=MXcpVqwz/piQDJPjPRw8/DxdzzF5fr4c3cO2xa+DK5b2Z/XhMqS6E7lEYLAKDFJbYF GRumbFVKnp0ZR20iicaADljopA0KuOxnL3r6iLbPKMRk4QddLmljfYJxoXMZm4ezgfUw vkQYfWU+XoWAKk0AqRDTYV8cnzsrwzYvaG/dg9zMDwpIDffj8aPQiOyFo4eP9flnDwps my5CQJoQWT0OWhvnAn/YJipW+gG4fzpIsmTD/8L5bsZtS8kE3EjP3SLlF9A+FvxWIovj hgwSxePDBPSxhbgd4QMwt7ToVgDm+BLUQAph0gTwDAvPwBsN5iM+EoD9ca7Le7u1AxVr qgwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:from; bh=cX0L2hErl26qZr4gPt66tmYY2+vSV58Lf4Fy8jDPd2w=; b=adOPQby697yCRuqeQ4STbLgV/1OUS+OA1nmff7zqmaVd4P3kJw21KOLAVQvfqeaxX4 JWezFy83mpV86pTjcngRj/2HWP5IQ+kx7z+eMm5T2GepTbTCHSJk927dn1W5rZqD6nj8 W+WoavT6rBfIVzPtjNt/y8CsPVhVmiuqum51re2QaPpt5XJV7j0QDpEXFrqd3CfzGZm/ 1gGlscLSsidbeY2pEXATZfWbdoOqO23N4eLs7A7oPUnUfxYL89Eu2r8oTV48rxi3BIaP PVi4O2pI02QnT9A2S8p7JoLVj2g647N5RK6OijPuJD/eG/1ItvPVRDwAVVQ38VPVlbnW wC5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si6317202pfn.212.2018.10.04.14.57.22; Thu, 04 Oct 2018 14:57:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727863AbeJEEvM (ORCPT + 99 others); Fri, 5 Oct 2018 00:51:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:42262 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726753AbeJEEvM (ORCPT ); Fri, 5 Oct 2018 00:51:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 493BCAE69; Thu, 4 Oct 2018 21:55:48 +0000 (UTC) From: NeilBrown To: Jan Harkes , David Howells Date: Fri, 05 Oct 2018 07:55:39 +1000 Cc: dhowells@redhat.com, "J. Bruce Fields" , Anna Schumaker , Alexander Viro , Trond Myklebust , 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 In-Reply-To: <3D5BB0E9-E43C-43D1-86E9-96E409A17D54@cs.cmu.edu> References: <153861496327.30373.10501882399296347125.stgit@noble> <153861471803.30373.6184444014227748848.stgit@noble> <28763.1538662213@warthog.procyon.org.uk> <3D5BB0E9-E43C-43D1-86E9-96E409A17D54@cs.cmu.edu> Message-ID: <877eixtm04.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 an= d 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 some= thing similar to what NFS is trying to do by allowing the actual check to b= e 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 w= rote: >>NeilBrown 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; >>>=20=20 >>> + /* 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlu2jFsACgkQOeye3VZi gblLuRAAnR31Tb6JV0RE8ovKIvqI5QnUr0207Po+mbADvzWFLYoaZ8WolExNgVea WSyDc0NcPWvtlnwcMWPpP++nznLSmYXk7bkFAgd+GWSth7GRIJHLmT8jGVmp7clg Pufhm01ig/VRGpR/rrx+Wb+oDn5hlL1hs7kRQC1X8H378FuXBaeziCJzkhRCnruo iWNjU/PKX0pBpCLcDQKZVyDoGec4fzw9R6T+2EPOrK1KRX+R0zrSeyBNLyytUhAa rNiw42IRTvc7YMCekW0MInKWNaC5qhklWN61kQVrNkgBzJbob6tuE0kXO4HuisXQ SijV6gwalEF5d08Zx+pxu5qKLMymK7E5CdAwgtf2Og3Bo6BZp+/MMtciuPmsNFKR ec0MPohasRI1VFIvG3tV6axWif+axJ+wcJbGI3eJkNxDFussvStvXzZ9oc20mB9T W212vQqiE5IdpHDmkSG1Dj8hQCFwNWtoA0waF/iVD1nI9XUi1LZoyrlN8+T/MSB0 C727iVI7tn5Z2YUOcr2yi+9guW+Gj4aNFEnNujQ7msVy6V2q+kQUwKcx4j3X4dB9 Tsaf4xjRs+WQb+q2DBqzp5ha4i6dDe8tLMKxdE1w1OSPTUfx7JEtBzqDePeVzfN6 fOqi6zUmTIU14ju/KGxyN3kDA17HSkTNCJ+Ufn3hUBjyzTb0i94= =6336 -----END PGP SIGNATURE----- --=-=-=--