Tizen 2.0 Release
[framework/base/acl.git] / man / man3 / acl_to_text.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual.  If not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\"
24 .Dd March 23, 2002
25 .Dt ACL_FROM_TEXT 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_to_text
29 .Nd convert an ACL to text
30 .Sh LIBRARY
31 Linux Access Control Lists library (libacl, \-lacl).
32 .Sh SYNOPSIS
33 .In sys/types.h
34 .In sys/acl.h
35 .Ft char *
36 .Fn acl_to_text "acl_t acl" "ssize_t *len_p"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_to_text
40 function translates the ACL pointed to by the argument
41 .Va acl
42 into a
43 .Li NULL
44 terminated character string.  If the pointer
45 .Va len_p
46 is not
47 .Li NULL ,
48 then the function returns the length of the string (not
49 including the
50 .Li NULL
51 terminator) in the location pointed to by
52 .Va len_p .
53 The format of the text string returned by
54 .Fn acl_to_text
55 is the long text form defined in
56 .Xr acl 5 .
57 The ACL referred to by
58 .Va acl
59 is not changed.
60 .Pp
61 This function allocates any memory necessary to contain the string and
62 returns a pointer to the string.  The caller should free any releasable
63 memory, when the new string is no longer required, by calling
64 .Xr acl_free 3
65 with the
66 .Va (void*)char
67 returned by
68 .Fn acl_to_text
69 as an argument.
70 .Sh RETURN VALUE
71 On success, this function returns a pointer to the
72 long text form of the ACL.
73 On error, a value of
74 .Li (char *)NULL
75 is returned, and
76 .Va errno
77 is set appropriately.
78 .Sh ERRORS
79 If any of the following conditions occur, the
80 .Fn acl_to_text
81 function returns a value of
82 .Li (char *)NULL
83 and sets
84 .Va errno
85 to the corresponding value:
86 .Bl -tag -width Er
87 .It Bq Er EINVAL
88 The argument
89 .Va acl
90 is not a valid pointer to an ACL.
91 .Pp
92 The ACL referenced by
93 .Va acl
94 contains one or more improperly formed ACL entries, or for some other
95 reason cannot be translated into a text form of an ACL.
96 .It Bq Er ENOMEM
97 The character string to be returned requires more memory than is allowed
98 by the hardware or system-imposed memory management constraints.
99 .El
100 .Sh STANDARDS
101 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
102 .Sh SEE ALSO
103 .Xr acl_free 3 ,
104 .Xw acl_from_text 3 ,
105 .Xr acl_to_any_text 3 ,
106 .Xr acl 5
107 .Sh AUTHOR
108 Derived from the FreeBSD manual pages written by
109 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
110 and adapted for Linux by
111 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .