Hi,

On Fri, Feb 23, 2001 at 03:22:11AM +0100, Andreas Gruenbacher wrote:
> On Thu, 22 Feb 2001, Stephen C. Tweedie wrote:
> 
> > > Then let's assume an ACL syscall, if you wish.
> > 
> > I don't wish, that's exactly the point.
> > 
> > By having an EA API which is generic enough to cope with ACLs too, we
> > can use the same API for other things such as MAC labels or DMAPI
> 
> There already _are_ numeric namespaces in the interface.

But you are arguing that we won't use that namespace for ACLs, but
that we'd use a different syscall.

> As I think we're
> not going to make much progress without discussing ACLs again

You're probably right. :)

> - 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.

> /* 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.

> 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.

> > I guess it's worth passing by Linus, though: he might prefer separate
> > syscalls for this.
> 
> I don't know Linus' opinion on this, but there are still many other things
> we need to sort out that might make this decision clear in the end.

I'm pretty happy with the proposal here, now: sounds like we're
getting close to consensus.

Cheers,
 Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to