2 File: linux/xattr_acl.h
4 (extended attribute representation of access control lists)
6 (C) 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org>
9 #ifndef _LINUX_XATTR_ACL_H
10 #define _LINUX_XATTR_ACL_H
12 #include <linux/posix_acl.h>
14 #define XATTR_NAME_ACL_ACCESS "system.posix_acl_access"
15 #define XATTR_NAME_ACL_DEFAULT "system.posix_acl_default"
17 #define XATTR_ACL_VERSION 0x0002
27 xattr_acl_entry a_entries
[0];
30 static inline size_t xattr_acl_size(int count
)
32 return sizeof(xattr_acl_header
) + count
* sizeof(xattr_acl_entry
);
35 static inline int xattr_acl_count(size_t size
)
37 if (size
< sizeof(xattr_acl_header
))
39 size
-= sizeof(xattr_acl_header
);
40 if (size
% sizeof(xattr_acl_entry
))
42 return size
/ sizeof(xattr_acl_entry
);
45 struct posix_acl
* posix_acl_from_xattr(const void *value
, size_t size
);
46 int posix_acl_to_xattr(const struct posix_acl
*acl
, void *buffer
, size_t size
);
50 #endif /* _LINUX_XATTR_ACL_H */