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