XFS acl support for SAMBA_2_2

John Trostel jtrostel at connex.com
Mon Feb 19 20:44:30 GMT 2001


On 19-Feb-2001 Jeremy Allison wrote:
> On Mon, Feb 19, 2001 at 01:00:36PM -0500, John Trostel wrote:
>> I am using this as a template to add in support for the SGI/XFS ACL
>> support.  It mirrors what I was working towards also.
>> 
>> Does this make sense?
> 
> Probably. Are you doing this on IRIX or on Linux ? If on Linux,
> can you please contact Andreas Gruenbacher <ag at moses.parsec.at>
> who is doing the ACL on Linux code used as a basis for the Liinux ACL code
> in Samba.

I'm doing this using the Linux/XFS CVS from SGI.  It's a fairly straight port
of the SGI XFS on IRIX to Linux and therefore doesn't get involved in a lot of
the thing that Andreas is working on.  Most of the work seems to be in getting
the wrappers in sysacls.c to function correctly.  Many of them are identity
mappings, and I am working on those which are not.

So far, it compiles.... it just doesn't add in any of the new ACLs yet. (I had
it working before using a hacked version of unix_acls.c, but it seems cleaner
to move it over and have everyone use the posix_acls.c code).
 
> He has a new draft of an extended attribute API for Linux that
> if you're working with the SGI/XFS on Linux port you should
> probably coordinate - as I know XFS has extended attributes
> and I don't want two API's to do the same thing on Linux.

I've read over the new draft and am not sure how this will (or should) affect
the implementation of Linux XFS ACLs.  Linux XFS acls are implemented with
system calls:

int acl_get (const char *path, int fd, struct acl *acl,
                    struct acl *dacl);

and

int acl_set (const char *path, int fd, struct acl *acl,
                    struct acl *dacl);

Userspace functions currently defined are very POSIX compliant and include:

extern ssize_t acl_copy_ext(void *, acl_t, ssize_t);
extern acl_t acl_copy_int(const void *);
extern int acl_create_entry(acl_t *, acl_entry_t *);
extern int acl_delete_def_file(const char *);
extern int acl_delete_entry(acl_t, acl_entry_t);
extern acl_t acl_dup(acl_t);
extern void acl_entry_sort(acl_t);
extern int acl_free(void *);
extern acl_t acl_from_text(const char *);
extern int acl_get_entry(acl_t, int, acl_entry_t *);
extern acl_t acl_get_fd(int);
extern acl_t acl_get_file(const char *, acl_type_t);
extern int acl_set_fd(int, acl_t);
extern int acl_set_file(const char *, acl_type_t, acl_t);
extern ssize_t acl_size(acl_t);
extern char *acl_to_short_text(acl_t, ssize_t *);
extern char *acl_to_text(acl_t, ssize_t *);
extern int acl_valid(acl_t);


These are very similar to the SAMBA/POSIX defaults and the Solaris/HPUX/etc.
acl functions already in use.

 
-- 
John M. Trostel
Linux OS Engineer
Connex
jtrostel at connex.com




More information about the samba-technical mailing list