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
32     appropriately.
33

ERRORS

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

STANDARDS

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

SEE ALSO

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

AUTHOR

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