summaryrefslogtreecommitdiff
path: root/man/man3/acl_from_text.3
blob: dd1f82d0b521bf128ec05c2614a34e5af78be377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.TH ACL_FROM_TEXT 3
.SH NAME
acl_from_text, acl_to_short_text, acl_to_text \- convert a POSIX ACL string to a struct acl or
a struct acl to a POSIX ACL string 
.SH SYNOPSIS
.B #include <sys/acl.h>
.PP
.B acl_t acl_from_text(const char *argp);
.br
.B char * acl_to_short_text(struct acl * aclp, ssize_t *len_p);
.br
.B char * acl_to_text(struct acl * aclp, ssize_t *len_p);
.SH DESCRIPTION
These routines convert strings defined by the POSIX P1003.1e specifications
(see
.IR chacl (1))
to/from 
.IR "struct acl" , 
which is the internal
format for an
Access Control List.  
.SH RETURN VALUES
\f2acl_from_text\fP returns a pointer to a \f2struct acl\fP
allocated by the routine or a NULL pointer in the case of a failure.
The acl should be freed when no longer needed by calling 
.IR acl_free (3).
.PP
\f2acl_to_text\fP returns a pointer to a null terminated 
character string allocated by the routine which is
a long form representation of the ACL, or a NULL pointer if an error
occurred.  This string
should be freed when no longer needed by calling
.IR acl_free (3).
If the \f2len_p\fP argument is not NULL, then the length of the string
is returned in \f2ssize_t\fP pointed to by \f2len_p\fP.
.PP
\f2acl_to_short_text\fP is identical to \f2acl_to_text\fP, except that a
short form representation of the ACL is returned.
.SH ERRORS
.I acl_from_text:
.TP 16
EINVAL
input text is invalid
.TP 16
ENOMEM
could not allocate space for new acl
.PP
.I acl_to_short_text:
.TP 16
EINVAL 
input acl is invalid
.TP 16
ENOMEM 
could not allocate space for the return string
.PP
.I acl_to_text:
.TP 16
EINVAL 
input acl is invalid
.TP 16
ENOMEM 
could not allocate space for the return string