Git init
[framework/base/acl.git] / man / man3 / acl_valid.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_VALID 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_valid
29 .Nd validate an ACL
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 int
36 .Fn acl_valid "acl_t acl"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_valid
40 function checks the ACL referred to by the argument
41 .Va acl
42 for validity.
43 .Pp
44 The three required entries ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER
45 must exist exactly once in the ACL. If the ACL contains any ACL_USER or
46 ACL_GROUP entries, then an ACL_MASK entry is also required. The ACL
47 may contain at most one ACL_MASK entry.
48 .Pp
49 The user identifiers must be unique among all entries of type ACL_USER.
50 The group identifiers must be unique among all entries of type ACL_GROUP.
51 .Sh RETURN VALUE
52 .Rv -std acl_valid
53 .Sh ERRORS
54 If any of the following conditions occur, the
55 .Fn acl_valid
56 function returns
57 .Li -1
58 and sets
59 .Va errno
60 to the corresponding value:
61 .Bl -tag -width Er
62 .It Bq Er EINVAL
63 The argument
64 .Va acl
65 is not a valid pointer to an ACL.
66 .Pp
67 The argument
68 .Va acl
69 does not point to a valid ACL.
70 .Pp
71 One or more of the required ACL entries is not present in
72 .Va acl .
73 .Pp
74 The ACL contains entries that are not unique.
75 .El
76 .Sh STANDARDS
77 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
78 .Sh SEE ALSO
79 .Xr acl_check 3 ,
80 .Xr acl_set_file 3 ,
81 .Xr acl 5
82 .Sh AUTHOR
83 Derived from the FreeBSD manual pages written by
84 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
85 and adapted for Linux by
86 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .