[PATCH v19 19/23] richacl: xattr mapping functions

2016-03-14 Thread Andreas Gruenbacher
Map between "system.richacl" xattrs and the in-kernel representation. Signed-off-by: Andreas Gruenbacher --- fs/Makefile| 2 +- fs/richacl_xattr.c | 161 + include/linux/richacl_xattr.h | 29 ++

[PATCH v19 14/23] vfs: Cache richacl in struct inode

2016-03-14 Thread Andreas Gruenbacher
Cache richacls in struct inode so that this doesn't have to be done individually in each filesystem. This is similar to POSIX ACLs. Signed-off-by: Andreas Gruenbacher --- fs/inode.c | 11 +-- fs/posix_acl.c | 2 +- fs/richacl_inode.c | 77

[PATCH v19 22/23] ext4: Add richacl support

2016-03-14 Thread Andreas Gruenbacher
eesh.ku...@linux.vnet.ibm.com> Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- fs/ext4/Kconfig | 11 + fs/ext4/Makefile | 1 + fs/ext4/file.c| 3 ++ fs/ext4/ialloc.c | 11 - fs/ext4/inode.c | 1

[PATCH v19 22/23] ext4: Add richacl support

2016-03-14 Thread Andreas Gruenbacher
From: "Aneesh Kumar K.V" Support the richacl permission model in ext4. The richacls are stored in "system.richacl" xattrs. Richacls need to be enabled by tune2fs or at file system create time. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andreas Gruenbacher Reviewe

[PATCH v19 10/23] posix_acl: Unexport acl_by_type and make it static

2016-03-14 Thread Andreas Gruenbacher
acl_by_type(inode, type) returns a pointer to either inode->i_acl or inode->i_default_acl depending on type. This is useful in fs/posix_acl.c, but should never have been visible outside that file. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Christop

[PATCH v19 10/23] posix_acl: Unexport acl_by_type and make it static

2016-03-14 Thread Andreas Gruenbacher
acl_by_type(inode, type) returns a pointer to either inode->i_acl or inode->i_default_acl depending on type. This is useful in fs/posix_acl.c, but should never have been visible outside that file. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig --- fs/posix

[PATCH v19 16/23] richacl: Check if an acl is equivalent to a file mode

2016-03-14 Thread Andreas Gruenbacher
be computed from the file permission bits. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/richacl_base.c | 104 include/linux/richacl.h | 1 + 2 files changed, 10

[PATCH v19 21/23] vfs: Add richacl permission checking

2016-03-14 Thread Andreas Gruenbacher
Hook the richacl permission checking function into the vfs. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/namei.c | 51 +-- fs/posix_acl.c | 6 +++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/fs/n

[PATCH v19 16/23] richacl: Check if an acl is equivalent to a file mode

2016-03-14 Thread Andreas Gruenbacher
be computed from the file permission bits. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/richacl_base.c | 104 include/linux/richacl.h | 1 + 2 files changed, 105 insertions(+) diff --git a/fs/richacl_base.c b/fs

[PATCH v19 21/23] vfs: Add richacl permission checking

2016-03-14 Thread Andreas Gruenbacher
Hook the richacl permission checking function into the vfs. Signed-off-by: Andreas Gruenbacher --- fs/namei.c | 51 +-- fs/posix_acl.c | 6 +++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index

[PATCH v19 13/23] vfs: Add get_richacl and set_richacl inode operations

2016-03-14 Thread Andreas Gruenbacher
These operations are similar to the get_acl and set_acl operations for POSIX ACLs. The distinction between access and default ACLs doesn't exist for richacls. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v19 13/23] vfs: Add get_richacl and set_richacl inode operations

2016-03-14 Thread Andreas Gruenbacher
These operations are similar to the get_acl and set_acl operations for POSIX ACLs. The distinction between access and default ACLs doesn't exist for richacls. Signed-off-by: Andreas Gruenbacher --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b

[PATCH v19 11/23] posix_acl: Improve xattr fixup code

2016-03-14 Thread Andreas Gruenbacher
Both XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT have the same XATTR_SYSTEM_PREFIX prefix; don't check for the same prefix repeatedly. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/xattr.c | 29 +++-- 1 file changed, 23 insertions

[PATCH v19 15/23] richacl: Update the file masks in chmod()

2016-03-14 Thread Andreas Gruenbacher
permission). The POSIX.1 standard calls this an alternate file access control mechanism. A subsequent chmod() would ensure that those permissions are disabled again. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/richacl_base.

[PATCH v19 17/23] richacl: Create-time inheritance

2016-03-14 Thread Andreas Gruenbacher
determines the file masks and file permission bits, and the umask is ignored. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/richacl_base.c | 81 + fs/richacl_inode.c | 70 ++ i

[PATCH v19 11/23] posix_acl: Improve xattr fixup code

2016-03-14 Thread Andreas Gruenbacher
Both XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT have the same XATTR_SYSTEM_PREFIX prefix; don't check for the same prefix repeatedly. Signed-off-by: Andreas Gruenbacher --- fs/xattr.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff

[PATCH v19 15/23] richacl: Update the file masks in chmod()

2016-03-14 Thread Andreas Gruenbacher
permission). The POSIX.1 standard calls this an alternate file access control mechanism. A subsequent chmod() would ensure that those permissions are disabled again. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/richacl_base.c | 42

[PATCH v19 17/23] richacl: Create-time inheritance

2016-03-14 Thread Andreas Gruenbacher
determines the file masks and file permission bits, and the umask is ignored. Signed-off-by: Andreas Gruenbacher --- fs/richacl_base.c | 81 + fs/richacl_inode.c | 70 ++ include/linux/richacl.h | 2

[PATCH v19 00/23] Richacls (Core and Ext4)

2016-03-14 Thread Andreas Gruenbacher
git \ richacl-2016-03-14 The richacl user-space utilitites, man pages, and test suite are available here: https://github.com/andreas-gruenbacher/richacl Changes to other user-space packages for richacl: https://github.com/andreas-gruenbacher/coreutils https://github.com/andreas-gruenbac

[PATCH v19 05/23] vfs: Add permission flags for setting file attributes

2016-03-14 Thread Andreas Gruenbacher
Richacls support permissions that allow to take ownership of a file, change the file permissions, and set the file timestamps. Support that by introducing new permission mask flags and by checking for those mask flags in inode_change_ok(). Signed-off-by: Andreas Gruenbacher <agrue...@redhat.

[PATCH v19 00/23] Richacls (Core and Ext4)

2016-03-14 Thread Andreas Gruenbacher
git \ richacl-2016-03-14 The richacl user-space utilitites, man pages, and test suite are available here: https://github.com/andreas-gruenbacher/richacl Changes to other user-space packages for richacl: https://github.com/andreas-gruenbacher/coreutils https://github.com/andreas-gruenbac

[PATCH v19 05/23] vfs: Add permission flags for setting file attributes

2016-03-14 Thread Andreas Gruenbacher
Richacls support permissions that allow to take ownership of a file, change the file permissions, and set the file timestamps. Support that by introducing new permission mask flags and by checking for those mask flags in inode_change_ok(). Signed-off-by: Andreas Gruenbacher Reviewed-by: J

[PATCH v19 02/23] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2016-03-14 Thread Andreas Gruenbacher
and create access when replacing an existing file in vfs_rename(). Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- fs/na

[PATCH v19 02/23] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2016-03-14 Thread Andreas Gruenbacher
and create access when replacing an existing file in vfs_rename(). Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields Reviewed-by: Andreas Dilger --- fs/namei.c | 49 + include/linux/fs.h | 2 ++ 2 files changed, 35

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-14 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static inline int >> +ext4_acl_chmod(struct inode *inode, umode_t mode) >> +{ >> + if (IS_RICHACL(inode)) >> + return richacl_chmod(inode, inode->i_mode); >> + return posix_acl_chmod(inode,

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-14 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static inline int >> +ext4_acl_chmod(struct inode *inode, umode_t mode) >> +{ >> + if (IS_RICHACL(inode)) >> + return richacl_chmod(inode, inode->i_mode); >> + return posix_acl_chmod(inode, inode->i_mode); >> +} > >

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-13 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static int >> +__ext4_set_richacl(handle_t *handle, struct inode *inode, struct richacl >> *acl) >> +{ >> + const int name_index = EXT4_XATTR_INDEX_RICHACL; >> + umode_t mode = inode->i_mode; >> + int

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-13 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static int >> +__ext4_set_richacl(handle_t *handle, struct inode *inode, struct richacl >> *acl) >> +{ >> + const int name_index = EXT4_XATTR_INDEX_RICHACL; >> + umode_t mode = inode->i_mode; >> + int retval, size; >> +

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-13 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static inline int >> +ext4_acl_chmod(struct inode *inode, umode_t mode) >> +{ >> + if (IS_RICHACL(inode)) >> + return richacl_chmod(inode, inode->i_mode); >> + return posix_acl_chmod(inode,

Re: [PATCH v18 21/22] ext4: Add richacl support

2016-03-13 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:27 PM, Christoph Hellwig wrote: >> +static inline int >> +ext4_acl_chmod(struct inode *inode, umode_t mode) >> +{ >> + if (IS_RICHACL(inode)) >> + return richacl_chmod(inode, inode->i_mode); >> + return posix_acl_chmod(inode, inode->i_mode); >> +} > >

Re: [PATCH v18 00/22] Richacls (Core and Ext4)

2016-03-13 Thread Andreas Gruenbacher
ixed up. I've applied your patch to the latest master branch, made it compile again, and fixed a few obvious problems. The results I get with smbcacls look reasonable now. The code is here: https://github.com/andreas-gruenbacher/samba richacl I've used the following smb.conf: [richacl] commen

Re: [PATCH v18 00/22] Richacls (Core and Ext4)

2016-03-13 Thread Andreas Gruenbacher
ied your patch to the latest master branch, made it compile again, and fixed a few obvious problems. The results I get with smbcacls look reasonable now. The code is here: https://github.com/andreas-gruenbacher/samba richacl I've used the following smb.conf: [richacl] comment = Richacl dire

Re: [PATCH v18 18/22] richacl: xattr mapping functions

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:17 PM, Christoph Hellwig wrote: >> +#include >> + >> +MODULE_LICENSE("GPL"); > > what's the point given that the code isn't even modolar? A leftover, removed now. >> +static void >> +fix_xattr_from_user(const char *kname, void *kvalue, size_t size)

Re: [PATCH v18 18/22] richacl: xattr mapping functions

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:17 PM, Christoph Hellwig wrote: >> +#include >> + >> +MODULE_LICENSE("GPL"); > > what's the point given that the code isn't even modolar? A leftover, removed now. >> +static void >> +fix_xattr_from_user(const char *kname, void *kvalue, size_t size) >> +{ >> + if

Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:07 PM, Christoph Hellwig <h...@infradead.org> wrote: > On Mon, Feb 29, 2016 at 09:17:16AM +0100, Andreas Gruenbacher wrote: >> POSIX ACLs and richacls are both objects allocated by kmalloc() with a >> reference count which are freed by kfree_rcu().

Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:07 PM, Christoph Hellwig wrote: > On Mon, Feb 29, 2016 at 09:17:16AM +0100, Andreas Gruenbacher wrote: >> POSIX ACLs and richacls are both objects allocated by kmalloc() with a >> reference count which are freed by kfree_rcu(). An inode can either >

Re: [PATCH v18 00/22] Richacls (Core and Ext4)

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:01 PM, Christoph Hellwig <h...@infradead.org> wrote: > On Mon, Feb 29, 2016 at 09:17:05AM +0100, Andreas Gruenbacher wrote: >> Al, >> >> could you please make sure you are happy with the current version of the >> richacl patch queue f

Re: [PATCH v18 00/22] Richacls (Core and Ext4)

2016-03-11 Thread Andreas Gruenbacher
On Fri, Mar 11, 2016 at 3:01 PM, Christoph Hellwig wrote: > On Mon, Feb 29, 2016 at 09:17:05AM +0100, Andreas Gruenbacher wrote: >> Al, >> >> could you please make sure you are happy with the current version of the >> richacl patch queue for the next merge wind

[PATCH v18 01/22] vfs: Add IS_ACL() and IS_RICHACL() tests

2016-02-29 Thread Andreas Gruenbacher
is still needed by nfsd. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- fs/Kconfig | 3 +++ fs/namei.c | 8 include/li

[PATCH v18 06/22] richacl: In-memory representation and helper functions

2016-02-29 Thread Andreas Gruenbacher
algorithm), and the file mask that applies to the process includes the requested permissions. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/Makefile | 2 + fs/richacl_base.c

[PATCH v18 07/22] richacl: Permission mapping functions

2016-02-29 Thread Andreas Gruenbacher
check in a richacl. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/richacl_base.c| 118 +++ include/linux/richacl.h | 3 ++ include/uapi/linux/ric

[PATCH v18 02/22] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2016-02-29 Thread Andreas Gruenbacher
and create access when replacing an existing file in vfs_rename(). Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- fs/na

[PATCH v18 09/22] richacl: Permission check algorithm

2016-02-29 Thread Andreas Gruenbacher
A richacl roughly grants a requested access if the NFSv4 acl in the richacl grants the requested permissions according to the NFSv4 permission check algorithm and the file mask that applies to the process includes the requested permissions. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.

[PATCH v18 01/22] vfs: Add IS_ACL() and IS_RICHACL() tests

2016-02-29 Thread Andreas Gruenbacher
is still needed by nfsd. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields Reviewed-by: Andreas Dilger --- fs/Kconfig | 3 +++ fs/namei.c | 8 include/linux/fs.h | 12 include/uapi/linux/fs.h | 3 ++- 4 files changed, 21

[PATCH v18 06/22] richacl: In-memory representation and helper functions

2016-02-29 Thread Andreas Gruenbacher
algorithm), and the file mask that applies to the process includes the requested permissions. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/Makefile | 2 + fs/richacl_base.c| 67 include/linux/richacl.h | 179

[PATCH v18 07/22] richacl: Permission mapping functions

2016-02-29 Thread Andreas Gruenbacher
check in a richacl. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/richacl_base.c| 118 +++ include/linux/richacl.h | 3 ++ include/uapi/linux/richacl.h | 44 3 files changed, 165 insertions

[PATCH v18 02/22] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags

2016-02-29 Thread Andreas Gruenbacher
and create access when replacing an existing file in vfs_rename(). Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields Reviewed-by: Andreas Dilger --- fs/namei.c | 49 + include/linux/fs.h | 2 ++ 2 files changed, 35

[PATCH v18 09/22] richacl: Permission check algorithm

2016-02-29 Thread Andreas Gruenbacher
A richacl roughly grants a requested access if the NFSv4 acl in the richacl grants the requested permissions according to the NFSv4 permission check algorithm and the file mask that applies to the process includes the requested permissions. Signed-off-by: Andreas Gruenbacher Reviewed-by: &q

[PATCH v18 04/22] vfs: Make the inode passed to inode_change_ok non-const

2016-02-29 Thread Andreas Gruenbacher
We will need to call iop->permission and iop->get_acl from inode_change_ok() for additional permission checks, and both take a non-const inode. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> Reviewed-by: Andreas Dilger

[PATCH v18 04/22] vfs: Make the inode passed to inode_change_ok non-const

2016-02-29 Thread Andreas Gruenbacher
We will need to call iop->permission and iop->get_acl from inode_change_ok() for additional permission checks, and both take a non-const inode. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields Reviewed-by: Andreas Dilger --- fs/attr.c | 2 +- include/linux/fs

[PATCH v18 12/22] vfs: Add get_richacl and set_richacl inode operations

2016-02-29 Thread Andreas Gruenbacher
These operations are similar to the get_acl and set_acl operations for POSIX ACLs. The distinction between access and default ACLs doesn't exist for richacls. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v18 12/22] vfs: Add get_richacl and set_richacl inode operations

2016-02-29 Thread Andreas Gruenbacher
These operations are similar to the get_acl and set_acl operations for POSIX ACLs. The distinction between access and default ACLs doesn't exist for richacls. Signed-off-by: Andreas Gruenbacher --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b

[PATCH v18 17/22] richacl: Automatic Inheritance

2016-02-29 Thread Andreas Gruenbacher
to "undo" applying the create mode; see richacl_compute_max_masks(). They should set the RICHACL_DEFAULTED flag. (A mechanism that would allow to indicate to the kernel to ignore the create mode in the first place when there are inherited permissions would be nice to have.) Signed-off-b

[PATCH v18 20/22] vfs: Add richacl permission checking

2016-02-29 Thread Andreas Gruenbacher
Hook the richacl permission checking function into the vfs. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/namei.c | 51 +-- fs/posix_acl.c | 6 +++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/fs/n

[PATCH v18 13/22] vfs: Cache richacl in struct inode

2016-02-29 Thread Andreas Gruenbacher
Cache richacls in struct inode so that this doesn't have to be done individually in each filesystem. This is similar to POSIX ACLs. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/inode.c | 11 +-- fs/posix_acl.c | 2 +- fs/richacl_inode.c

[PATCH v18 17/22] richacl: Automatic Inheritance

2016-02-29 Thread Andreas Gruenbacher
to "undo" applying the create mode; see richacl_compute_max_masks(). They should set the RICHACL_DEFAULTED flag. (A mechanism that would allow to indicate to the kernel to ignore the create mode in the first place when there are inherited permissions would be nice to have.) Signed-off-b

[PATCH v18 20/22] vfs: Add richacl permission checking

2016-02-29 Thread Andreas Gruenbacher
Hook the richacl permission checking function into the vfs. Signed-off-by: Andreas Gruenbacher --- fs/namei.c | 51 +-- fs/posix_acl.c | 6 +++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index

[PATCH v18 13/22] vfs: Cache richacl in struct inode

2016-02-29 Thread Andreas Gruenbacher
Cache richacls in struct inode so that this doesn't have to be done individually in each filesystem. This is similar to POSIX ACLs. Signed-off-by: Andreas Gruenbacher --- fs/inode.c | 11 +-- fs/posix_acl.c | 2 +- fs/richacl_inode.c | 77

[PATCH v18 18/22] richacl: xattr mapping functions

2016-02-29 Thread Andreas Gruenbacher
Map between "system.richacl" xattrs and the in-kernel representation. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/Makefile| 2 +- fs/richacl_xattr.c | 162 + fs/xattr.c

[PATCH v18 15/22] richacl: Check if an acl is equivalent to a file mode

2016-02-29 Thread Andreas Gruenbacher
be computed from the file permission bits. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/richacl_base.c | 104 include/linux/richacl.h | 1 + 2 files changed, 10

[PATCH v18 18/22] richacl: xattr mapping functions

2016-02-29 Thread Andreas Gruenbacher
Map between "system.richacl" xattrs and the in-kernel representation. Signed-off-by: Andreas Gruenbacher --- fs/Makefile| 2 +- fs/richacl_xattr.c | 162 + fs/xattr.c | 29 +-

[PATCH v18 15/22] richacl: Check if an acl is equivalent to a file mode

2016-02-29 Thread Andreas Gruenbacher
be computed from the file permission bits. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/richacl_base.c | 104 include/linux/richacl.h | 1 + 2 files changed, 105 insertions(+) diff --git a/fs/richacl_base.c b/fs

[PATCH v18 11/22] vfs: Cache base_acl objects in inodes

2016-02-29 Thread Andreas Gruenbacher
, introduce a new base_acl type and convert i_acl and i_default_acl to that type. In most cases, the vfs then doesn't care which kind of acl an inode caches (if any). Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- drivers/staging/l

[PATCH v18 16/22] richacl: Create-time inheritance

2016-02-29 Thread Andreas Gruenbacher
determines the file masks and file permission bits, and the umask is ignored. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/richacl_base.c | 81 + fs/richacl_inode.c | 70 ++ i

[PATCH v18 11/22] vfs: Cache base_acl objects in inodes

2016-02-29 Thread Andreas Gruenbacher
, introduce a new base_acl type and convert i_acl and i_default_acl to that type. In most cases, the vfs then doesn't care which kind of acl an inode caches (if any). Signed-off-by: Andreas Gruenbacher Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- fs/f2fs/acl.c

[PATCH v18 16/22] richacl: Create-time inheritance

2016-02-29 Thread Andreas Gruenbacher
determines the file masks and file permission bits, and the umask is ignored. Signed-off-by: Andreas Gruenbacher --- fs/richacl_base.c | 81 + fs/richacl_inode.c | 70 ++ include/linux/richacl.h | 2

[PATCH v18 21/22] ext4: Add richacl support

2016-02-29 Thread Andreas Gruenbacher
eesh.ku...@linux.vnet.ibm.com> Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilger.ca> --- fs/ext4/Kconfig | 11 + fs/ext4/Makefile | 1 + fs/ext4/file.c| 3 ++ fs/ext4/ialloc.c | 11 - fs/ext4/inode.c | 1

[PATCH v18 14/22] richacl: Update the file masks in chmod()

2016-02-29 Thread Andreas Gruenbacher
permission). The POSIX.1 standard calls this an alternate file access control mechanism. A subsequent chmod() would ensure that those permissions are disabled again. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com> --- fs/richacl_base.

[PATCH v18 19/22] richacl: Add richacl xattr handler

2016-02-29 Thread Andreas Gruenbacher
Add richacl xattr handler implementing the xattr operations based on the get_richacl and set_richacl inode operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/richacl_xattr.c| 73 +++ include/linux/richacl_xattr.

[PATCH v18 22/22] ext4: Add richacl feature flag

2016-02-29 Thread Andreas Gruenbacher
, richacls are automatically enabled and using the "noacl" mount option leads to an error. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Andreas Dilger <adil...@dilg

[PATCH v18 21/22] ext4: Add richacl support

2016-02-29 Thread Andreas Gruenbacher
From: "Aneesh Kumar K.V" Support the richacl permission model in ext4. The richacls are stored in "system.richacl" xattrs. Richacls need to be enabled by tune2fs or at file system create time. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andreas Gruenbacher Reviewe

[PATCH v18 14/22] richacl: Update the file masks in chmod()

2016-02-29 Thread Andreas Gruenbacher
permission). The POSIX.1 standard calls this an alternate file access control mechanism. A subsequent chmod() would ensure that those permissions are disabled again. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/richacl_base.c | 42

[PATCH v18 19/22] richacl: Add richacl xattr handler

2016-02-29 Thread Andreas Gruenbacher
Add richacl xattr handler implementing the xattr operations based on the get_richacl and set_richacl inode operations. Signed-off-by: Andreas Gruenbacher --- fs/richacl_xattr.c| 73 +++ include/linux/richacl_xattr.h | 2 ++ 2 files changed

[PATCH v18 22/22] ext4: Add richacl feature flag

2016-02-29 Thread Andreas Gruenbacher
using the "noacl" mount option leads to an error. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andreas Gruenbacher Reviewed-by: Andreas Dilger --- fs/ext4/ext4.h | 6 -- fs/ext4/super.c | 49 - 2 files changed, 44 insertions(+

[PATCH v18 03/22] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags

2016-02-29 Thread Andreas Gruenbacher
checking for delete access inside a directory, and MAY_DELETE_SELF when checking for delete access to a file itelf. The MAY_DELETE_SELF permission overrides the sticky directory check. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: J. Bruce Fields <bfie...@redhat.com

[PATCH v18 00/22] Richacls (Core and Ext4)

2016-02-29 Thread Andreas Gruenbacher
/git/agruen/linux-richacl.git \ richacl-2016-02-22 The richacl user-space utilitites, man pages, and test suite are available here: https://github.com/andreas-gruenbacher/richacl Changes to other user-space packages for richacl: https://github.com/andreas-gruenbacher/coreutils https

[PATCH v18 10/22] posix_acl: Unexport acl_by_type and make it static

2016-02-29 Thread Andreas Gruenbacher
acl_by_type(inode, type) returns a pointer to either inode->i_acl or inode->i_default_acl depending on type. This is useful in fs/posix_acl.c, but should never have been visible outside that file. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/posix_acl.c

[PATCH v18 03/22] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags

2016-02-29 Thread Andreas Gruenbacher
checking for delete access inside a directory, and MAY_DELETE_SELF when checking for delete access to a file itelf. The MAY_DELETE_SELF permission overrides the sticky directory check. Signed-off-by: Andreas Gruenbacher Reviewed-by: J. Bruce Fields --- fs/namei.c | 20

[PATCH v18 00/22] Richacls (Core and Ext4)

2016-02-29 Thread Andreas Gruenbacher
/git/agruen/linux-richacl.git \ richacl-2016-02-22 The richacl user-space utilitites, man pages, and test suite are available here: https://github.com/andreas-gruenbacher/richacl Changes to other user-space packages for richacl: https://github.com/andreas-gruenbacher/coreutils https

[PATCH v18 10/22] posix_acl: Unexport acl_by_type and make it static

2016-02-29 Thread Andreas Gruenbacher
acl_by_type(inode, type) returns a pointer to either inode->i_acl or inode->i_default_acl depending on type. This is useful in fs/posix_acl.c, but should never have been visible outside that file. Signed-off-by: Andreas Gruenbacher --- fs/posix_acl.c| 3 +-- include

[PATCH v18 05/22] vfs: Add permission flags for setting file attributes

2016-02-29 Thread Andreas Gruenbacher
Richacls support permissions that allow to take ownership of a file, change the file permissions, and set the file timestamps. Support that by introducing new permission mask flags and by checking for those mask flags in inode_change_ok(). Signed-off-by: Andreas Gruenbacher <agrue...@redhat.

[PATCH v18 08/22] richacl: Compute maximum file masks from an acl

2016-02-29 Thread Andreas Gruenbacher
masks (such as setting an acl via nfsd). When user-space sets an acl via setxattr, the extended attribute already includes the file masks. Setting an acl also sets the file mode permission bits: they are determined by the file masks; see richacl_masks_to_mode(). Signed-off-by: Andreas Gruenbacher

[PATCH v18 05/22] vfs: Add permission flags for setting file attributes

2016-02-29 Thread Andreas Gruenbacher
Richacls support permissions that allow to take ownership of a file, change the file permissions, and set the file timestamps. Support that by introducing new permission mask flags and by checking for those mask flags in inode_change_ok(). Signed-off-by: Andreas Gruenbacher Reviewed-by: J

[PATCH v18 08/22] richacl: Compute maximum file masks from an acl

2016-02-29 Thread Andreas Gruenbacher
masks (such as setting an acl via nfsd). When user-space sets an acl via setxattr, the extended attribute already includes the file masks. Setting an acl also sets the file mode permission bits: they are determined by the file masks; see richacl_masks_to_mode(). Signed-off-by: Andreas Gruenbacher

Re: richacl(7) man page review comments

2016-02-28 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:16 AM, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> <mtk.manpa...@gmail.com> wrote: >>> I've

Re: richacl(7) man page review comments

2016-02-28 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:16 AM, Michael Kerrisk (man-pages) wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> wrote: >>> I've once more pulled from the latest git; here's some more comments.

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 4:09 PM, Andreas Gruenbacher <agrue...@redhat.com> wrote: > Hi Michael, > > On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) > <mtk.manpa...@gmail.com> wrote: >> On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >>> On

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 4:09 PM, Andreas Gruenbacher wrote: > Hi Michael, > > On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) > wrote: >> On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >>> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages)

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
Hi Michael, On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> <mtk.manpa...@gmail.com> wrote: >

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
Hi Michael, On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> wrote: >>> I've once more pulled from the latest git; h

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) wrote: > So, in terms of actually testing this stuff, is it just a matter of > applying your patch series to the kernel, building the kernel, pulling > the RichACL user-space tools from Git, and mount(8)ing a

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:58 AM, Michael Kerrisk (man-pages) wrote: > So, in terms of actually testing this stuff, is it just a matter of > applying your patch series to the kernel, building the kernel, pulling > the RichACL user-space tools from Git, and mount(8)ing a filesystem with > the

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:16 AM, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> <mtk.manpa...@gmail.com> wrote: >>> Could we s

Re: richacl(7) man page review comments

2016-02-23 Thread Andreas Gruenbacher
On Tue, Feb 23, 2016 at 11:16 AM, Michael Kerrisk (man-pages) wrote: > On 02/22/2016 03:46 PM, Andreas Gruenbacher wrote: >> On Sun, Feb 21, 2016 at 10:40 PM, Michael Kerrisk (man-pages) >> wrote: >>> Could we start with just a few simple examples already, and

Re: richacl(7) man page review comments

2016-02-22 Thread Andreas Gruenbacher
ages >> .\" >> .\" Copyright (C) 2015,2016 Red Hat, Inc. >> .\" Written by Andreas Gruenbacher <agrue...@redhat.com> >> .\" This is free documentation; you can redistribute it and/or >> .\" modify it under the terms of the GNU

Re: richacl(7) man page review comments

2016-02-22 Thread Andreas Gruenbacher
.\" Copyright (C) 2015,2016 Red Hat, Inc. >> .\" Written by Andreas Gruenbacher >> .\" This is free documentation; you can redistribute it and/or >> .\" modify it under the terms of the GNU General Public License as >> .\" published by the Free

Re: richacl(7) man page review comments

2016-02-20 Thread Andreas Gruenbacher
Hi Michael, thanks again for all the feedback. I've followed all your suggestions; again, please see the github repo for the latest version: https://github.com/andreas-gruenbacher/richacl On Sun, Feb 14, 2016 at 10:31 PM, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote

Re: richacl(7) man page review comments

2016-02-20 Thread Andreas Gruenbacher
Hi Michael, thanks again for all the feedback. I've followed all your suggestions; again, please see the github repo for the latest version: https://github.com/andreas-gruenbacher/richacl On Sun, Feb 14, 2016 at 10:31 PM, Michael Kerrisk (man-pages) wrote: > Hi Andreas, > > Here's a

Re: richacl(7) man page review comments

2016-02-15 Thread Andreas Gruenbacher
On Mon, Feb 15, 2016 at 11:25 AM, Michael Kerrisk (man-pages) wrote: > You're right. I was confusing with xattr(7). So, I think it might > make some sense to eventually move both of these into man-pages (for > richacl(7), at least, it's probably worth delaying this for a

Re: richacl(7) man page review comments

2016-02-15 Thread Andreas Gruenbacher
On Mon, Feb 15, 2016 at 11:25 AM, Michael Kerrisk (man-pages) wrote: > You're right. I was confusing with xattr(7). So, I think it might > make some sense to eventually move both of these into man-pages (for > richacl(7), at least, it's probably worth delaying this for a bit), > since they're

<    2   3   4   5   6   7   8   9   10   11   >