On Fri, 23 Feb 2001, Stephen C. Tweedie wrote:
> Hi,
> > - The whole ACL is passed to the kernel in one chunk of memory.
> > - There is a header, followed by a number of entries. The entry
> > format depends on the type of the ACL, as specified in the header:
> >
> > struct acl_header {
> > int class;
> > unsigned int entries;
> > };
>
> We don't really need a class designator if we're already using the EA
> namespace variable for this API. As for the "entries", better just to
> pass in the size of the buffer in bytes as a syscall parameter: that's
> what most related syscalls do already, and it's nicely unambiguous.
Passing the number of entries (in adition to the toal size) is useful
because it cannot trivially be computed with dynamic entry lengths, yet it
is probably needed. Also, we don't have a space problem here.
>
> > /* Entry format for Posix ACLs (class = ACL_CLASS_POSIX) */
> > struct posix_acl_entry {
> > short e_tag; /* ACL_USER_OBJ, ACL_USER, etc. */
> > short e_id_type; /* 0 = numeric ID's */
> > int e_perm; /* permission bits */
> > union {
> > id_t e_numeric_id;
> > ...
> > } e_id;
> > };
> >
> > The entry length can be dynamic, if the ID is not of fixed length (e.g.,
> > "user@domain" format).
>
> Fine, but then specify the length as an explicit field in each acl
> entry just for the sake of clarity when parsing the fields. That also
> means that we don't get confused if the name is an odd number of
> bytes: we can still round the length of the entire entry up to a
> longword without confusion over where the next entry starts in the
> buffer.
Fine.
> > For passing this structure to the kernel, we could either define a new
> > system call, or pass it via an EA system call. I'm assuming an EA system
> > call here.
>
> Fine.
>
> > If we are going to use an EA system call, then we could either put all
> > ACLs (or even all "system objects") in the same namespace, and distinguish
> > them by the attribute name, or we could create several different
> > namespaces. These approaches don't differ significantly.
>
> Yes, they do --- the EA namespace really should be for setting the
> opaque value of arbitrary named attributes, whereas ACLs (and MAC, and
> DMAPI etc.) may require the kernel to know about the semantics of the
> attribute contents. They really should be kept separate.
In fact, I'm not entirely happy with the acl_posix namespace, and after
thinking about it consider the previous classification (user, inode,
trusted, system) better. (This is also what Robert Watson suggested.)
The different system attributes (ACLs, CAPs, MAC labels, etc.) could then
be identified by attribute name, e.g., "acl.posix.access",
"acl.posix.default", "acl.afs", "cap", etc.
This is a little bit more clear semantically: All EA's in `system' have
the semantics of being passed in/out as one chunk, and the kernel needs to
check values, convert and dispatch, etc. Otherwise, we'd end up with a
whole bunch of namespaces, each with basically the same semantics, but
each namespace would have to be dealt with separately (e.g., in userspace,
you would have to explicitly list all of them for operations that
conceptually apply to all system EA's, etc.)
I think I should update the proposal, and re-issue it. Unfortunately I'm
on a seminar from tomorrow until Wednesday, so I can't react immediately.
Also, there were numerous other issues (transactional semantics,
complexity, etc.) that people objected to, so we also still discuss these,
issue by issue.
Cheers,
Andreas.
------------------------------------------------------------------------
Andreas Gruenbacher, [EMAIL PROTECTED]
Contact information: http://www.bestbits.at/~ag/
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]