xref: /dragonfly/share/man/man9/VOP_SETACL.9 (revision 82730a9c)
1.\"-
2.\" Copyright (c) 1999 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: src/share/man/man9/VOP_SETACL.9,v 1.1.2.3 2001/12/17 11:30:18 ru Exp $
27.\"
28.Dd December 23, 1999
29.Dt VOP_SETACL 9
30.Os
31.Sh NAME
32.Nm VOP_SETACL
33.Nd set the 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_SETACL "struct vnode *vp" "acl_type_t type" "struct acl *aclp" "struct ucred *cred" "struct proc *p"
40.Sh DESCRIPTION
41This vnode call may be used to set the access control list (ACL) for a file
42or 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 set
50.It Fa aclp
51a pointer to an ACL structure from which to retrieve the ACL data
52.It Fa cred
53the user credentials to use in authorizing the request
54.It Fa p
55the process setting the ACL
56.El
57.Pp
58The
59.Fa aclp
60pointer may be
61.Dv NULL
62to indicate that the specified ACL should be deleted.
63.Pp
64The
65.Fa cred
66pointer may be
67.Dv NULL
68to indicate that access control checks are not to be performed, if possible.
69This cred setting might be used to allow the kernel to authorize ACL
70changes that the active process might not be permitted to make.
71.Pp
72The vnode ACL interface defines the syntax, and not semantics, of file and
73directory ACL interfaces.  More information about ACL management in kernel
74may be found in
75.Xr acl 9 .
76.Sh LOCKS
77The vnode will be locked on entry and should remain locked on return.
78.Sh RETURN VALUES
79If the ACL is successfully set, then zero is returned.  Otherwise, an
80appropriate error code is returned.
81.Sh ERRORS
82.Bl -tag -width Er
83.It Bq Er EINVAL
84The ACL type passed is invalid for this vnode, or the ACL data is invalid
85.It Bq Er EACCES
86Permission denied
87.It Bq Er ENOMEM
88Insufficient memory available to fulfill request
89.It Bq Er EOPNOTSUPP
90The file system does not support
91.Fn VOP_SETACL
92.It Bq Er ENOSPC
93The file system is out of space
94.It Bq Er EROFS
95The file system is read-only
96.El
97.Sh SEE ALSO
98.Xr acl 9 ,
99.Xr vnode 9 ,
100.Xr VOP_ACLCHECK 9 ,
101.Xr VOP_GETACL 9
102.Sh AUTHORS
103This man page was written by
104.An Robert Watson .
105