From owner-freebsd-hackers Mon Nov 25 7:41:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8EC337B401 for ; Mon, 25 Nov 2002 07:41:30 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7A8043EAA for ; Mon, 25 Nov 2002 07:41:25 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gAPFfMBF034898; Mon, 25 Nov 2002 10:41:22 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Mon, 25 Nov 2002 10:41:21 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Dancho Penev Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: default acl for directory In-Reply-To: <20021123160418.GA252@earth.dpsca.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 23 Nov 2002, Dancho Penev wrote: > I was played with acl and specially default acl for directories at my > FreeBSD-CURRENT machine with UFS2 filesystem and some questions appears > to me: > > 1. How about default acl permission to override umask? Is that the idea > who isn't yet implemented or you have opinions against that. My reading of the POSIX.1e spec was that umask would continue to mask ACLs in the same manner it masked permissions. However, you're welcome to re-read the spec, or e-mail the POSIX.1e mailing list, and let us know if the result looks different to you :-). The idea, btw, I suspect, is that this provides maximum compatibility for applications that understand only permissions and not full ACLs. > 2. What are reasons to update ACL_MASK entry (if exist) or ACL_GROUP_OBJ > entry (if mask doesn't exist) but not both in ufs_sync_acl_from_inode()? > > It's true that reverse function ufs_sync_inode_from_acl() uses the same > logic but take a look at follow situation: This is another POSIX.1e-ism, and our implementation is based on a reading of that draft spec. If you want to give it a reading, or query the POSIX.1e list for clarification, I'd welcome any investigation of the issue. My understanding is that the goal of the mask is to match the semantics of the permissions group entry in the traditional inode protections for applications that don't understand ACLs. I.e., suppose an application creates a file, then chmods it 0600 -- the application wants the owner, and only the owner, to have read and write access. If a mask entry is present (and it is required if there is ever any other extended entry), then we update the mask entry in the chmod(), which in effect leads to the same result: it masks all entries but the owner and the other entry. If there's no mask entry, then there are no extended entries, so we actually change the group protections. If the implementation of this logic looks incorrect, please let me know. Also, feel free to read the spec and e-mail the list and see if this actually is a sensical interpretation of the spec. Thanks, Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message