xfs
[Top] [All Lists]

Re: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permis

To: Miklos Szeredi <miklos@xxxxxxxxxx>
Subject: Re: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags
From: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Date: Mon, 13 Feb 2017 16:34:53 +0100
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna.schumaker@xxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, linux-ext4 <linux-ext4@xxxxxxxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, Linux NFS Mailing List <linux-nfs@xxxxxxxxxxxxxxx>, linux-cifs@xxxxxxxxxxxxxxx, Linux API <linux-api@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CAELBmZAF7stgY3DxaeZLd2Nt+c5rTnVC_yFORGxxN1HHoctPaQ@xxxxxxxxxxxxxx>
References: <1476190256-1677-1-git-send-email-agruenba@xxxxxxxxxx> <1476190256-1677-3-git-send-email-agruenba@xxxxxxxxxx> <CAELBmZAF7stgY3DxaeZLd2Nt+c5rTnVC_yFORGxxN1HHoctPaQ@xxxxxxxxxxxxxx>
Miklos,

On Fri, Dec 2, 2016 at 10:22 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> On Tue, Oct 11, 2016 at 2:50 PM, Andreas Gruenbacher
> <agruenba@xxxxxxxxxx> wrote:
>> Richacls distinguish between creating non-directories and directories. To
>> support that, add an isdir parameter to may_create(). When checking
>> inode_permission() for create permission, pass in an additional
>> MAY_CREATE_FILE or MAY_CREATE_DIR mask flag.
>>
>> Add may_replace() to allow checking for delete and create access when
>> replacing an existing file in vfs_rename().
>
> That works for plain rename, but not for RENAME_EXCHANGE: is_dir and
> new_is_dir may be different, which means we can be deleting a
> non-directory *and* creating a directory in one dir and vice versa in
> the other.

ok, I see now. Should be fixed in the latest posting from just now.

Thanks a lot,
Andreas

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags, Andreas Gruenbacher <=