[Box Backup-dev] Extended attributes on FreeBSD 5/6

James O'Gorman boxbackup-dev@fluffy.co.uk
Mon, 13 Feb 2006 11:33:48 +0000


Hi Martin,

On Mon, Feb 13, 2006 at 01:27:46AM +0000, Martin Ebourne wrote:
> I'm not sure how much detail you know about acl and xattrs, but they are
> quite different things.

To be honest, I don't know much about them at all. I do use ACLs in
FreeBSD as I do need to assign more than one group to a dir in several
cases on my production machines. I'm almost one of those dangerous
people who has a little knowledge but not quite enough ;-)

> It just so happens that on Linux acls were designed using xattrs as
> their underlying storage mechanism, so by handling xattrs we get acls
> for free. I don't believe this is true of all platforms. Currently box
> knows nothing about acls.

Right, got it. Is ACL support in the pipeline, or is that way in the
future (or a complete nono)? While it's not necessary obviously it would
be nice if we could have it.

> What sort of functions are in acl.h? Does it look like they're really
> xattr functions (listattr etc) in a different file, or is it a different
> API? If the former then we can try and fix something up, otherwise it's
> a whole new feature. Abstracting out the attributes support to make it
> into a generic interface with implementations for each type would make
> the code more flexible and easier I think, maybe such a thing could come
> out in the wash in such a change.

I had another look and as well as sys/acl.h there's a sys/extattr.h.

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/ has these files.

James