resetting manifest requested domain to floor
[platform/upstream/acl.git] / man / man3 / acl_equiv_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_EQUIV_MODE 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_equiv_mode
29 .Nd check for an equivalent ACL
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 int
36 .Fn acl_equiv_mode "acl_t acl" "mode_t *mode_p"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_equiv_mode
40 function checks if the ACL pointed to by the argument
41 .Va acl
42 contains only the required ACL entries of tag types
43 ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, and contains no
44 permissions other that ACL_READ, ACL_WRITE or ACL_EXECUTE.
45 If the ACL has this form, it can can be fully represented with
46 the traditional file permission bits, and is considered
47 equivalent with the traditional file permission bits.
48 .Pp
49 If
50 .Va acl
51 is an equivalent ACL and the pointer
52 .Va mode_p
53 is not
54 .Li NULL , 
55 the value pointed to by
56 .Va mode_p
57 is set to the value that defines the same owner, group and other
58 permissions as contained in
59 the ACL.
60 .Sh RETURN VALUE
61 On success, this function returns the value
62 .Li 0
63 if
64 .Va acl
65 is an equivalent ACL, and the value
66 .Li 1
67 if
68 .Va acl
69 is not an equivalent ACL. On error, the value
70 .Li -1
71 is returned, and
72 .Va errno
73 is set appropriately.
74 .Sh ERRORS
75 If any of the following conditions occur, the
76 .Fn acl_equiv_mode
77 function returns the value
78 .Li -1
79 and sets
80 .Va errno
81 to the corresponding value:
82 .Bl -tag -width Er
83 .It Bq Er EINVAL
84 The argument
85 .Va acl
86 is not a valid pointer to an ACL.
87 .El
88 .Sh STANDARDS
89 This is a non-portable, Linux specific extension to the ACL manipulation
90 functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned).
91 .Sh SEE ALSO
92 .Xr acl_from_mode 3 ,
93 .Xr acl 5
94 .Sh AUTHOR
95 Written by
96 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .