From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [RFC v7 15/41] richacl: Automatic Inheritance Date: Wed, 23 Sep 2015 09:55:44 -0400 Message-ID: <20150923135544.GA27083@fieldses.org> References: <1441448856-13478-1-git-send-email-agruenba@redhat.com> <1441448856-13478-16-git-send-email-agruenba@redhat.com> <20150918184014.GB21506@fieldses.org> <20150922015146.GA15960@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andreas Gruenbacher Return-path: Content-Disposition: inline In-Reply-To: <20150922015146.GA15960-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-cifs.vger.kernel.org On Mon, Sep 21, 2015 at 09:51:46PM -0400, J. Bruce Fields wrote: > On Mon, Sep 21, 2015 at 11:19:59PM +0200, Andreas Gruenbacher wrote: > > 2015-09-18 20:40 GMT+02:00 J. Bruce Fields : > > > On Sat, Sep 05, 2015 at 12:27:10PM +0200, Andreas Gruenbacher wrote: > > >> Automatic Inheritance (AI) allows changes to the acl of a directory to > > > In the above "file" sometimes means "any object" and somethings "a > > > non-directory". I can sort it out, but more consistent terminology > > > would help. > > > > Okay, I'll fix it. > > > > >> Linux does not have a way of creating files without setting the file > > >> permission bits, so all files created inside a directory with > > >> RICHACL_AUTO_INHERIT set will have the RICHACL_PROTECTED flag set. This > > >> effectively disables Automatic Inheritance. > > >> > > >> Protocols which support creating files without specifying permissions > > >> can explicitly clear the RICHACL_PROTECTED flag after creating a file > > >> and reset the file masks to "undo" applying the create mode; see > > >> richacl_compute_max_masks(). They should set the RICHACL_DEFAULTED > > >> flag. This is a workaround; a mechanism that would allow a process to > > >> indicate to the kernel to ignore the create mode when there are > > >> inherited permissions would fix this problem. > > > > > > Also, as you know: current nfsd has no way to create files without > > > setting permissions. And if we were to implement that it's unclear how > > > many clients would actually use it (Windows clients are rare). And of > > > course Samba doesn't have the interfaces it would need. > > > > > > I think we should just drop this for now. The rest of the richacl stuff > > > is still useful without it. > > > > Samba will hack around it and adjust the ACL after the create; that's > > still better than not having Automatic Inheritance. Windows uses AI > > all the time so AI is more important for Samba than for NFSv4. > > Oh, OK, that makes sense. Even just giving them a place to store the > bits would be better than nothing. So, ignore my objection there.... Oh, and Reviewed-by: J. Bruce Fields --b. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754816AbbIWNzs (ORCPT ); Wed, 23 Sep 2015 09:55:48 -0400 Received: from fieldses.org ([173.255.197.46]:33575 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153AbbIWNzp (ORCPT ); Wed, 23 Sep 2015 09:55:45 -0400 Date: Wed, 23 Sep 2015 09:55:44 -0400 From: "J. Bruce Fields" To: Andreas Gruenbacher Cc: linux-kernel@vger.kernel.org, linux-fsdevel , linux-nfs@vger.kernel.org, linux-api@vger.kernel.org, linux-cifs@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [RFC v7 15/41] richacl: Automatic Inheritance Message-ID: <20150923135544.GA27083@fieldses.org> References: <1441448856-13478-1-git-send-email-agruenba@redhat.com> <1441448856-13478-16-git-send-email-agruenba@redhat.com> <20150918184014.GB21506@fieldses.org> <20150922015146.GA15960@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150922015146.GA15960@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 21, 2015 at 09:51:46PM -0400, J. Bruce Fields wrote: > On Mon, Sep 21, 2015 at 11:19:59PM +0200, Andreas Gruenbacher wrote: > > 2015-09-18 20:40 GMT+02:00 J. Bruce Fields : > > > On Sat, Sep 05, 2015 at 12:27:10PM +0200, Andreas Gruenbacher wrote: > > >> Automatic Inheritance (AI) allows changes to the acl of a directory to > > > In the above "file" sometimes means "any object" and somethings "a > > > non-directory". I can sort it out, but more consistent terminology > > > would help. > > > > Okay, I'll fix it. > > > > >> Linux does not have a way of creating files without setting the file > > >> permission bits, so all files created inside a directory with > > >> RICHACL_AUTO_INHERIT set will have the RICHACL_PROTECTED flag set. This > > >> effectively disables Automatic Inheritance. > > >> > > >> Protocols which support creating files without specifying permissions > > >> can explicitly clear the RICHACL_PROTECTED flag after creating a file > > >> and reset the file masks to "undo" applying the create mode; see > > >> richacl_compute_max_masks(). They should set the RICHACL_DEFAULTED > > >> flag. This is a workaround; a mechanism that would allow a process to > > >> indicate to the kernel to ignore the create mode when there are > > >> inherited permissions would fix this problem. > > > > > > Also, as you know: current nfsd has no way to create files without > > > setting permissions. And if we were to implement that it's unclear how > > > many clients would actually use it (Windows clients are rare). And of > > > course Samba doesn't have the interfaces it would need. > > > > > > I think we should just drop this for now. The rest of the richacl stuff > > > is still useful without it. > > > > Samba will hack around it and adjust the ACL after the create; that's > > still better than not having Automatic Inheritance. Windows uses AI > > all the time so AI is more important for Samba than for NFSv4. > > Oh, OK, that makes sense. Even just giving them a place to store the > bits would be better than nothing. So, ignore my objection there.... Oh, and Reviewed-by: J. Bruce Fields --b.