1.\" $NetBSD: VOP_GETACL.9,v 1.2 2022/01/17 23:12:41 wiz Exp $ 2.\"- 3.\" Copyright (c) 1999, 2000, 2001 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_GETACL.9 235319 2012-05-12 03:46:43Z gjb $ 28.\" 29.Dd January 17, 2022 30.Dt VOP_GETACL 9 31.Os 32.Sh NAME 33.Nm VOP_GETACL 34.Nd retrieve 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_GETACL "struct vnode *vp" "acl_type_t type" "struct acl *aclp" "kauth_cred_t cred" 41.Sh DESCRIPTION 42This vnode call may be used to retrieve the access control list (ACL) from a 43file 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 retrieve. 51.It Fa aclp 52A pointer to an ACL structure to receive 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 performed, if possible. 62This cred setting might be used to allow the kernel to authorize ACL 63retrieval that the active process might not be permitted to do. 64.Pp 65The vnode ACL interface defines the syntax, and not semantics, of file and 66directory ACL interfaces. 67More information about ACL management in kernel may be found in 68.Xr acl 9 . 69.Sh LOCKS 70The vnode will be locked on entry and should remain locked on return. 71.Sh RETURN VALUES 72If the 73.Fa aclp 74pointer will point to a valid ACL, then zero is returned. 75Otherwise, an appropriate error code is returned. 76.Sh ERRORS 77.Bl -tag -width Er 78.It Bq Er EACCES 79The caller does not have the appropriate privilege. 80.It Bq Er EINVAL 81The ACL type passed is invalid for this vnode. 82.It Bq Er ENOMEM 83Sufficient memory is not available to fulfill the request. 84.It Bq Er EOPNOTSUPP 85The file system does not support 86.Fn VOP_GETACL . 87.El 88.Sh SEE ALSO 89.Xr acl 9 , 90.Xr vnode 9 , 91.Xr VOP_ACLCHECK 9 , 92.Xr VOP_SETACL 9 93.Sh AUTHORS 94This manual page was written by 95.An Robert Watson . 96