[PATCH 3/4] xfs: SGI ACLs: Map uid/gid namespaces
Andreas Gruenbacher
agruenba at redhat.com
Tue Oct 27 10:55:22 CDT 2015
On Mon, Oct 26, 2015 at 10:46 PM, Dave Chinner <david at fromorbit.com> wrote:
> On Sat, Oct 24, 2015 at 11:16:08PM +0200, Andreas Gruenbacher wrote:
>> @@ -71,10 +72,10 @@ xfs_acl_from_disk(
>>
>> switch (acl_e->e_tag) {
>> case ACL_USER:
>> - acl_e->e_uid = xfs_uid_to_kuid(be32_to_cpu(ace->ae_id));
>> + acl_e->e_uid = make_kuid(ns, be32_to_cpu(ace->ae_id));
>
> Please don't replace the xfs wrappers with the horribly named
> generic functions. Pass the namespace to xfs_uid_to_kuid(), and
> modify them, please. That way people who don't deal with namespaces
> every day can tell exactly what format conversion is taking place
> just by reading the code...
We would effectively end up with:
#define xfs_kuid_to_uid from_kuid
#define xfs_kgid_to_gid from_kgid
#define xfs_uid_to_kuid make_kuid
#define xfs_gid_to_kgid make_kgid
Are you sure you really want that?
> This namespace stuff is awful twisty. The posix layer does a user-ns
> to init-ns conversion and here we do a no-op init-ns to init-ns
> conversion. That needs comments in the code to explain exactly why
> one path needs user-ns conversion and the other doesn't, because I'm
> sure as hell not going to remember why these code paths are
> different in 6 months time.
Okay.
Thanks,
Andreas
More information about the xfs
mailing list