Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534762 > unrolled thread

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

Started byMiklos Szeredi <miklos@szeredi.hu>
First post2016-12-02 10:30 +0100
Last post2016-12-02 10:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR  permission flags Miklos Szeredi <miklos@szeredi.hu> - 2016-12-02 10:30 +0100

#1534762 — Re: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-12-02 10:30 +0100
SubjectRe: [PATCH v27 02/21] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags
Message-ID<sJSki-1ZS-17@gated-at.bofh.it>
On Tue, Oct 11, 2016 at 2:50 PM, Andreas Gruenbacher
<agruenba@redhat.com> 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.

Thanks,
Miklos

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web