Re: [nfsv4] Constructing a NFSv4 ACL from POSIX mode bits

Nico Williams <nico@cryptonector.com> Tue, 24 July 2012 20:01 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C364A11E80B3 for <nfsv4@ietfa.amsl.com>; Tue, 24 Jul 2012 13:01:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.228
X-Spam-Level:
X-Spam-Status: No, score=-3.228 tagged_above=-999 required=5 tests=[AWL=-1.251, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pfaa84WdTRlc for <nfsv4@ietfa.amsl.com>; Tue, 24 Jul 2012 13:01:00 -0700 (PDT)
Received: from homiemail-a30.g.dreamhost.com (caiajhbdcagg.dreamhost.com [208.97.132.66]) by ietfa.amsl.com (Postfix) with ESMTP id 27AF211E80A4 for <nfsv4@ietf.org>; Tue, 24 Jul 2012 13:01:00 -0700 (PDT)
Received: from homiemail-a30.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a30.g.dreamhost.com (Postfix) with ESMTP id 4BE6321DE65 for <nfsv4@ietf.org>; Tue, 24 Jul 2012 13:00:59 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=cryptonector.com; h=mime-version :in-reply-to:references:date:message-id:subject:from:to:cc: content-type; q=dns; s=cryptonector.com; b=S9iPtEWmBfQyFgJDtivM/ HTuONdOLJ489p/7HgHkj1olSuDg4MkKGx6jl3HJZ7An09uxFwBnk+icElRBfXZGG i6yxoHjlF3f33/macBEJya6pK+JnJ6IkHj5oM3H/VwlystBSVjE9llZsruFbD6KW rNwVvYV4qAW9Jameyp1Qk8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=pt+BpB7EvC7qcJuqN+BY Qsv9JtM=; b=N6CRjc7YIycHJasN/BkuHAn/SEPBxly7DMJQ9Fr7UFCT2UpECEoX bo44rXWZW1Was1Hq6B1S8UmSX4Eg53gvqpbXddqvzpLl5ARv5pRkQF36s7Cm06XT Vszu2X0Y6ADbu9UfY6A1YjXH9BxYdnRZSLA2jyHXj3wfGHm0b8DHo/A=
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a30.g.dreamhost.com (Postfix) with ESMTPSA id 18AB021DE7D for <nfsv4@ietf.org>; Tue, 24 Jul 2012 13:00:59 -0700 (PDT)
Received: by yhq56 with SMTP id 56so7776633yhq.31 for <nfsv4@ietf.org>; Tue, 24 Jul 2012 13:00:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.66.75.168 with SMTP id d8mr7109692paw.63.1343160057205; Tue, 24 Jul 2012 13:00:57 -0700 (PDT)
Received: by 10.143.29.16 with HTTP; Tue, 24 Jul 2012 13:00:57 -0700 (PDT)
In-Reply-To: <20120724193348.GA4977@netapp.com>
References: <20120724193348.GA4977@netapp.com>
Date: Tue, 24 Jul 2012 15:00:57 -0500
Message-ID: <CAK3OfOji009CP88tDNOp-nvdPBkvp0oKfJUqhO_TYuZktwhUCg@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: "Haynes, Tom" <thomas@netapp.com>
Content-Type: text/plain; charset="UTF-8"
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org, nfsv4@ietf.org
Subject: Re: [nfsv4] Constructing a NFSv4 ACL from POSIX mode bits
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Jul 2012 20:01:00 -0000

On Tue, Jul 24, 2012 at 2:33 PM, Haynes, Tom <thomas@netapp.com> wrote:
> Bruce,
>
> In looking at http://tools.ietf.org/html/draft-ietf-nfsv4-acl-mapping-05, it
> states that when mapping the write bit, only for the owner do we set
> ACE4_WRITE_ACL.
>
> Back in version 00, it is open as to whether we can also set it for the
> group and other if they have the write bit set.
>
> I looked back at the NFSv4 WG aliases and I see some discussion from Lisa
> on how Solaris only ever sets it for the owner due to POSIX restrictions
> via chmod(). So, now I know how another server does it.

This has changed.  I wrote this up here:

http://cryptonector.com/2011/11/zfs-aclchmod-interactions-in-solaris-11/

IIRC all ACEs for anything other than OWNER@ (or a user of the same
name/ID) contribute to the group bits of the mode, the EVERYONE@ entry
contributes to the world bits of the mode, and the OWNER@ and/or user
ACEs for the owner name/ID contribute to the owner bits of the mode.

The new scheme is really much simpler and more natural than everything
else tried before.

Nico
--