1ACL_FROM_TEXT(3)         BSD Library Functions Manual         ACL_FROM_TEXT(3)
2

NAME

4     acl_to_text — convert an ACL to text
5

LIBRARY

7     Linux Access Control Lists library (libacl, -lacl).
8

SYNOPSIS

10     #include <sys/types.h>
11     #include <sys/acl.h>
12
13     char *
14     acl_to_text(acl_t acl, ssize_t *len_p);
15

DESCRIPTION

17     The acl_to_text() function translates the ACL pointed to by the argument
18     acl into a NULL terminated character string.  If the pointer len_p is not
19     NULL, then the function returns the length of the string (not including
20     the NULL terminator) in the location pointed to by len_p.  The format of
21     the text string returned by acl_to_text() is the long text form defined
22     in acl(5).  The ACL referred to by acl is not changed.
23
24     This function allocates any memory necessary to contain the string and
25     returns a pointer to the string.  The caller should free any releasable
26     memory, when the new string is no longer required, by calling acl_free(3)
27     with the (void*)char returned by acl_to_text() as an argument.
28

RETURN VALUE

30     On success, this function returns a pointer to the long text form of the
31     ACL.  On error, a value of (char *)NULL is returned, and errno is set ap‐
32     propriately.
33

ERRORS

35     If any of the following conditions occur, the acl_to_text() function re‐
36     turns a value of (char *)NULL and sets errno to the corresponding value:
37
38     [EINVAL]           The argument acl is not a valid pointer to an ACL.
39
40                        The ACL referenced by acl contains one or more improp‐
41                        erly formed ACL entries, or for some other reason can‐
42                        not be translated into a text form of an ACL.
43
44     [ENOMEM]           The character string to be returned requires more mem‐
45                        ory than is allowed by the hardware or system-imposed
46                        memory management constraints.
47

STANDARDS

49     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
50

SEE ALSO

52     acl_free(3), acl_to_any_text(3), acl(5)
53

AUTHOR

55     Derived from the FreeBSD manual pages written by Robert N M Watson
56     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
57     <andreas.gruenbacher@gmail.com>.
58
59Linux ACL                       March 23, 2002                       Linux ACL
Impressum