summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/VOP_SETACL.9 4.html
blob: 48255ca0d483a97b142b47a9cad13e3e87f4508a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<table class="head">
  <tr>
    <td class="head-ltitle">VOP_SETACL(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VOP_SETACL(9)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">VOP_SETACL</code> &#x2014; <span class="Nd">set
    the access control list for a vnode</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">sys/param.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/vnode.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/acl.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">VOP_SETACL</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *vp</var>, <var class="Fa" style="white-space: nowrap;">acl_type_t
    type</var>, <var class="Fa" style="white-space: nowrap;">struct acl
    *aclp</var>, <var class="Fa" style="white-space: nowrap;">struct ucred
    *cred</var>, <var class="Fa" style="white-space: nowrap;">struct thread
    *td</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">This vnode call may be used to set the access control list (ACL)
    for a file or directory.</p>
<p class="Pp">Its arguments are:</p>
<dl class="Bl-tag">
  <dt><var class="Fa">vp</var></dt>
  <dd>The vnode of the file or directory.</dd>
  <dt><var class="Fa">type</var></dt>
  <dd>The type of ACL to set.</dd>
  <dt><var class="Fa">aclp</var></dt>
  <dd>A pointer to an ACL structure from which to retrieve the ACL data.</dd>
  <dt><var class="Fa">cred</var></dt>
  <dd>The user credentials to use in authorizing the request.</dd>
  <dt><var class="Fa">td</var></dt>
  <dd>The thread setting the ACL.</dd>
</dl>
<p class="Pp">The <var class="Fa">aclp</var> pointer may be
    <code class="Dv">NULL</code> to indicate that the specified ACL should be
    deleted.</p>
<p class="Pp">The <var class="Fa">cred</var> pointer may be
    <code class="Dv">NULL</code> to indicate that access control checks are not
    to be performed, if possible. This cred setting might be used to allow the
    kernel to authorize ACL changes that the active process might not be
    permitted to make.</p>
<p class="Pp">The vnode ACL interface defines the syntax, and not semantics, of
    file and directory ACL interfaces. More information about ACL management in
    kernel may be found in <a class="Xr">acl(9)</a>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="LOCKS"><a class="permalink" href="#LOCKS">LOCKS</a></h1>
<p class="Pp">The vnode will be locked on entry and should remain locked on
    return.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
<p class="Pp">If the ACL is successfully set, then zero is returned. Otherwise,
    an appropriate error code is returned.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<dl class="Bl-tag">
  <dt id="EINVAL">[<a class="permalink" href="#EINVAL"><code class="Er">EINVAL</code></a>]</dt>
  <dd>The ACL type passed is invalid for this vnode, or the ACL data is
    invalid.</dd>
  <dt id="EACCES">[<a class="permalink" href="#EACCES"><code class="Er">EACCES</code></a>]</dt>
  <dd>The caller does not have the appropriate privilege.</dd>
  <dt id="ENOMEM">[<a class="permalink" href="#ENOMEM"><code class="Er">ENOMEM</code></a>]</dt>
  <dd>Sufficient memory is not available to fulfill the request.</dd>
  <dt id="EOPNOTSUPP">[<a class="permalink" href="#EOPNOTSUPP"><code class="Er">EOPNOTSUPP</code></a>]</dt>
  <dd>The file system does not support
    <code class="Fn">VOP_SETACL</code>().</dd>
  <dt id="ENOSPC">[<a class="permalink" href="#ENOSPC"><code class="Er">ENOSPC</code></a>]</dt>
  <dd>The file system is out of space.</dd>
  <dt id="EROFS">[<a class="permalink" href="#EROFS"><code class="Er">EROFS</code></a>]</dt>
  <dd>The file system is read-only.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">acl(9)</a>, <a class="Xr">vnode(9)</a>,
    <a class="Xr">VOP_ACLCHECK(9)</a>, <a class="Xr">VOP_GETACL(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Robert
    Watson</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">December 23, 1999</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>