ACK: [PATCH Xenial SRU] UBUNTU: zfs: Fix user namespaces uid/gid mapping

Seth Forshee seth.forshee at canonical.com
Fri May 6 13:24:18 UTC 2016


On Fri, May 06, 2016 at 07:13:55AM -0600, tim.gardner at canonical.com wrote:
> From: Brian Behlendorf <behlendorf1 at llnl.gov>
> 
> BugLink: http://bugs.launchpad.net/bugs/1567558
> 
> Cherry-picked from 874bd959f4f15b3d4b007160ee7ad3f4111dd341 ('Fix user
> namespaces uid/gid mapping')
> https://github.com/zfsonlinux/zfs.git
> 
> As described in torvalds/linux at 5f3a4a2 the &init_user_ns, and
> not the current user_ns, should be passed to posix_acl_from_xattr()
> and posix_acl_to_xattr().  Conveniently the init_user_ns is
> available through the init credential (kcred).
> 
> Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
> Signed-off-by: Massimo Maggi <me at massimo-maggi.eu>
> Closes #4177
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>

I reviewed this change previously. It's a little confusing at first, but
CRED and kcred are defined in SPL to be the current credentials and the
"kernel" credentials, respectively. The right thing to do for zfs is to
translate ids in posix ACL xattrs relative to &init_user_ns rather than
current_cred()->user_ns, which is in effect what this patch does.

Acked-by: Seth Forshee <seth.forshee at canonical.com>




More information about the kernel-team mailing list