Re: [PATCH -V7 21/26] richacl: xattr mapping functions

From: Aneesh Kumar K.V
Date: Thu Oct 20 2011 - 07:06:00 EST


On Thu, 20 Oct 2011 05:19:46 -0400, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Thu, Oct 20, 2011 at 05:14:34AM -0400, J. Bruce Fields wrote:
> > > > Does it really make sense to use a string here just to pick between the
> > > > three choices OWNER@, GROUP@, and EVERYONE@? Why not just another small
> > > > integer? Is the goal to expand this somehow eventually?
> > >
>
> > > I guess Andreas wanted the disk layout to be able to store user@domain
> > > format if needed.
> >
> > Is that likely? For that to be useful, tasks would need to be able to
> > run as user@domain strings. And we'd probably want owners and groups to
> > also be user@domain strings.
> >
> > The container people seem to eventually want to add some kind of
> > namespace identifier everywhere:
> >
> > http://marc.info/?l=linux-kernel&m=131836778427871&w=2
> >
> > in which case I guess we'd likely end up with (uid, user namespace id)
> > instead of user@domain?
>
>
> Storing strings is an extremly stupid idea. The only thing that would
> make sense would be storing a windows-style 128-bit GUID.
>

How about updating the richacl_xattr as below

struct richace_xattr {
__le16 e_type;
__le16 e_flags;
__le32 e_mask;
__le32 e_size;
u8 e_id[0];
};

now e_flags can contain ACE4_SPECIAL_WHO to indicate value in e_id
indicate special who values (which could be 1 byte value indicating
OWNER@, GROUP@ or EVERYONE@), ACE4_UNIXID_WHO, to indicate value
in e_id is the little endian value of unix id. ACE_WINSID_WHO to
indicate e_id is the 128 bit array containing SID value. ?

-aneesh

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/