1 The Posix ACL user library
2 ==========================
4 The Posix ACL manipulation functions defined in Posix 1003.1e DS17 are
5 declared in <sys/acl.h>; you need to link against libacl.a for these
6 functions to be included in your binaries.
8 There is an additional header file <acl/libacl.h> that gives you
9 access to some extensions that are also contained in the same library.
10 The functions declared there are:
14 Similar to acl_to_text(), but also allows you to specify:
15 - a prefix string that is printed before each ACL entry.
16 - a seperator character that is printed between two ACL entries.
17 - a set of options (TEXT_* constants).
19 This function returns the length in characters of the text returned
20 in the len_p parameter, unless len_p is NULL. The returned string
21 must be freed using the acl_free() function.
23 Returns NULL and sets errno accordingly on error.
25 acl_entry_to_any_str()
27 Converts a single ACL entry to text, filling a buffer. It takes as
28 additional parameter the ACL mask entry (which is used to computer
29 the effective permissions if specified). The prefix and options are
30 the same as for acl_to_any_text().
32 Returns -1 and sets errno accordingly on error.
36 Returns 0 if both ACLs are equal, and 1 otherwise.
38 Returns -1 and sets errno accordingly on error.
42 Checks an ACL for validity, similar to acl_valid. Returns the entry
43 at which an error occurred in last (unless last is NULL), and
44 returns a positive error code (ACL_*_ERROR) if the ACL is invalid; 0
47 Returns -1 and sets errno accordingly on error.
51 Checks if an ACL is a basic ACL. If so, returns 0 and sets mode_p to
52 the file mode permission bits that correspond to the ACL. Returns 1
55 Returns -1 and sets errno accordingly on error.
59 Returns the number of entries in an ACL.
61 Returns -1 and sets errno accordingly on error.
65 Returns a textual message describing the error code returned by
70 Check if a permission is set in a permission set (acl_permset_t).
72 Returns 1 if the permission is set, or 0 if it is not set.
73 Returns -1 and sets errno if an error occurs.