Git init
[framework/base/acl.git] / man / man3 / acl_from_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_from_text
29 .Nd create an ACL from 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 acl_t
36 .Fn acl_from_text "const char *buf_p"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_from_text
40 function converts the text form of the ACL referred to by
41 .Va buf_p
42 into the internal form of an ACL and returns a pointer to the working storage
43 that contains the ACL. The
44 .Fn acl_from_text
45 function accepts as input the long text form and short text form of an ACL as described in
46 .Xr acl 5 .
47 .Pp
48 This function may cause memory to be allocated.  The caller should free any
49 releasable memory, when the new ACL is no longer required, by calling
50 .Xr acl_free 3
51 with the
52 .Va (void*)acl_t
53 returned by
54 .Fn acl_from_text
55 as an argument.
56 .Sh RETURN VALUE
57 On success, this function returns a pointer to the
58 working storage.  On error, a value of
59 .Li (acl_t)NULL
60 is returned, and
61 .Va errno
62 is set appropriately.
63 .Sh ERRORS
64 If any of the following conditions occur, the
65 .Fn acl_from_text
66 function returns a value of
67 .Li (acl_t)NULL
68 and sets
69 .Va errno
70 to the corresponding value:
71 .Bl -tag -width Er
72 .It Bq Er EINVAL
73 The argument
74 .Va buf_p
75 cannot be translated into an ACL.
76 .It Bq Er ENOMEM
77 The
78 .Va acl_t
79 to be returned requires more memory than is allowed by the hardware or
80 system-imposed memory management constraints.
81 .El
82 .Sh STANDARDS
83 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
84 .Sh SEE ALSO
85 .Xr acl_free 3 ,
86 .Xr acl_get_entry 3 ,
87 .Xw acl_to_text 3 ,
88 .Xr acl 5
89 .Sh AUTHOR
90 Derived from the FreeBSD manual pages written by
91 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
92 and adapted for Linux by
93 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .