xref: /netbsd-src/share/man/man9/VOP_ACLCHECK.9 (revision 8dc77b19f847e92a07203a8f0f0c7eaa80dc426f)
1.\" $NetBSD: VOP_ACLCHECK.9,v 1.2 2022/01/17 23:12:41 wiz Exp $
2.\"-
3.\" Copyright (c) 1999 Robert N. M. Watson
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD: head/share/man/man9/VOP_ACLCHECK.9 206622 2010-04-14 19:08:06Z uqs $
28.\"
29.Dd January 17, 2022
30.Dt VOP_ACLCHECK 9
31.Os
32.Sh NAME
33.Nm VOP_ACLCHECK
34.Nd check an access control list for a vnode
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/vnode.h
38.In sys/acl.h
39.Ft int
40.Fn VOP_ACLCHECK "struct vnode *vp" "acl_type_t type" "struct acl *aclp" "kauth_cred_t cred"
41.Sh DESCRIPTION
42This vnode call may be used to determine the validity of a particular access
43control list (ACL) for a particular file or directory.
44.Pp
45Its arguments are:
46.Bl -tag -width type
47.It Fa vp
48The vnode of the file or directory.
49.It Fa type
50The type of ACL to check.
51.It Fa aclp
52A pointer to an ACL structure from which to retrieve the ACL data.
53.It Fa cred
54The user credentials to use in authorizing the request.
55.El
56.Pp
57The
58.Fa cred
59pointer may be
60.Dv NULL
61to indicate that access control checks are not to be
62performed, if possible.
63This cred setting might be used to allow the
64kernel to authorize ACL verification that the active process might not be
65permitted to do.
66.Pp
67The vnode ACL interface defines the syntax, and not semantics, of file and
68directory ACL interfaces.
69More information about ACL management in kernel
70may be found in
71.Xr acl 9 .
72.Sh LOCKS
73No locks are required to call this vnode method, and any locks held on
74entry will be held on exit.
75.Sh RETURN VALUES
76If the
77.Fa aclp
78pointer points to a valid ACL of type
79.Fa type
80for the object
81.Fa vp ,
82then zero is returned.
83Otherwise, an appropriate error code is returned.
84.Sh ERRORS
85.Bl -tag -width Er
86.It Bq Er EACCES
87The file or directory ACL does not permit access.
88.It Bq Er EINVAL
89The ACL type passed is invalid for this vnode, or the ACL data is invalid.
90.It Bq Er ENOMEM
91Sufficient memory is not available to fulfill the request.
92.It Bq Er EOPNOTSUPP
93The file system does not support
94.Fn VOP_ACLCHECK .
95.El
96.Sh SEE ALSO
97.Xr acl 9 ,
98.Xr vnode 9 ,
99.Xr VOP_GETACL 9 ,
100.Xr VOP_SETACL 9
101.Sh AUTHORS
102This manual page was written by
103.An Robert Watson .
104