OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / acl / original / man3 / acl_from_mode.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
6 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15 .\" SUCH DAMAGE.
16 .\"
17 .Dd March 23, 2002
18 .Dt ACL_FROM_MODE 3
19 .Os "Linux ACL"
20 .Sh NAME
21 .Nm acl_from_mode
22 .Nd create an ACL from file permission bits
23 .Sh LIBRARY
24 Linux Access Control Lists library (libacl, \-lacl).
25 .Sh SYNOPSIS
26 .In sys/types.h
27 .In acl/libacl.h
28 .Ft acl_t
29 .Fn acl_from_mode "mode_t mode"
30 .Sh DESCRIPTION
31 The
32 .Fn acl_from_mode
33 function creates a minimal ACL that contains the three entries with tag
34 types ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, with permissions
35 corresponding to the owner, group, and other permission bits of its
36 argument
37 .Va mode .
38 .Sh RETURN VALUE
39 On success, this function returns a pointer to the
40 working storage. On error, a value of
41 .Li (acl_t)NULL
42 is returned, and
43 .Va errno
44 is set appropriately.
45 .Sh ERRORS
46 If any of the following conditions occur, the
47 .Fn acl_from_mode
48 function returns a value of
49 .Li (acl_t)NULL
50 and sets
51 .Va errno
52 to the corresponding value:
53 .Bl -tag -width Er
54 .It Bq Er ENOMEM
55 The ACL working storage requires more memory than is allowed by the
56 hardware or system-imposed memory management constraints.
57 .El
58 .Sh STANDARDS
59 This is a non-portable, Linux specific extension to the ACL manipulation
60 functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned).
61 .Sh SEE ALSO
62 .Xr acl_equiv_mode 3 ,
63 .Xr acl_get_file 3 ,
64 .Xr acl 5
65 .Sh AUTHOR
66 Written by
67 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .