resetting manifest requested domain to floor
[platform/upstream/acl.git] / man / man3 / acl_from_mode.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_MODE 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_from_mode
29 .Nd create an ACL from file permission bits
30 .Sh LIBRARY
31 Linux Access Control Lists library (libacl, \-lacl).
32 .Sh SYNOPSIS
33 .In sys/types.h
34 .In acl/libacl.h
35 .Ft acl_t
36 .Fn acl_from_mode "mode_t mode"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_from_mode
40 function creates a minimal ACL that contains the three entries with tag
41 types ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, with permissions
42 corresponding to the owner, group, and other permission bits of its
43 argument
44 .Va mode .
45 .Sh RETURN VALUE
46 On success, this function returns a pointer to the
47 working storage. On error, a value of
48 .Li (acl_t)NULL
49 is returned, and
50 .Va errno
51 is set appropriately.
52 .Sh ERRORS
53 If any of the following conditions occur, the
54 .Fn acl_from_mode
55 function returns a value of
56 .Li (acl_t)NULL
57 and sets
58 .Va errno
59 to the corresponding value:
60 .Bl -tag -width Er
61 .It Bq Er ENOMEM
62 The ACL working storage requires more memory than is allowed by the
63 hardware or system-imposed memory management constraints.
64 .El
65 .Sh STANDARDS
66 This is a non-portable, Linux specific extension to the ACL manipulation
67 functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned).
68 .Sh SEE ALSO
69 .Xr acl_equiv_mode 3 ,
70 .Xr acl_get_file 3 ,
71 .Xr acl 5
72 .Sh AUTHOR
73 Written by
74 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .