Re: [PATCH 3/4] xfs: SGI ACLs: Map uid/gid namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 26, 2015 at 10:46 PM, Dave Chinner <david@xxxxxxxxxxxxx> 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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux