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