]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/9p/acl.c
userns: Pass a userns parameter into posix_acl_to_xattr and posix_acl_from_xattr
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 11 Sep 2012 03:17:44 +0000 (20:17 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 18 Sep 2012 08:01:35 +0000 (01:01 -0700)
commit5f3a4a28ec140a90e6058d1d09f6b1f235d485e5
treea8fc30f22d94033bd5bb4ccfe5218b01bfafcc50
parent2f6f0654ab61961fd0f7701fe3be89ea111f0cda
userns: Pass a userns parameter into posix_acl_to_xattr and posix_acl_from_xattr

 - Pass the user namespace the uid and gid values in the xattr are stored
   in into posix_acl_from_xattr.

 - Pass the user namespace kuid and kgid values should be converted into
   when storing uid and gid values in an xattr in posix_acl_to_xattr.

- Modify all callers of posix_acl_from_xattr and posix_acl_to_xattr to
  pass in &init_user_ns.

In the short term this change is not strictly needed but it makes the
code clearer.  In the longer term this change is necessary to be able to
mount filesystems outside of the initial user namespace that natively
store posix acls in the linux xattr format.

Cc: Theodore Tso <tytso@mit.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
17 files changed:
fs/9p/acl.c
fs/btrfs/acl.c
fs/ext2/acl.c
fs/ext3/acl.c
fs/ext4/acl.c
fs/generic_acl.c
fs/gfs2/acl.c
fs/jffs2/acl.c
fs/jfs/acl.c
fs/jfs/xattr.c
fs/nfs/nfs3acl.c
fs/nfsd/vfs.c
fs/ocfs2/acl.c
fs/reiserfs/xattr_acl.c
fs/xattr_acl.c
fs/xfs/xfs_acl.c
include/linux/posix_acl_xattr.h