summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/vaccess.9 3.html
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:43 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:43 -0400
commitac5e55f5f2af5b92794c2aded46c6bae85b5f5ed (patch)
tree9367490586c84cba28652e443e3166d66c33b0d9 /static/freebsd/man9/vaccess.9 3.html
parent253e67c8b3a72b3a4757fdbc5845297628db0a4a (diff)
docs: Added All FreeBSD Manuals
Diffstat (limited to 'static/freebsd/man9/vaccess.9 3.html')
-rw-r--r--static/freebsd/man9/vaccess.9 3.html99
1 files changed, 99 insertions, 0 deletions
diff --git a/static/freebsd/man9/vaccess.9 3.html b/static/freebsd/man9/vaccess.9 3.html
new file mode 100644
index 00000000..80cc8b09
--- /dev/null
+++ b/static/freebsd/man9/vaccess.9 3.html
@@ -0,0 +1,99 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">VACCESS(9)</td>
+ <td class="head-vol">Kernel Developer's Manual</td>
+ <td class="head-rtitle">VACCESS(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">vaccess</code> &#x2014; <span class="Nd">generate
+ an access control decision using vnode parameters</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></p>
+<p class="Pp"><var class="Ft">int</var>
+ <br/>
+ <code class="Fn">vaccess</code>(<var class="Fa">enum vtype type</var>,
+ <var class="Fa">mode_t file_mode</var>, <var class="Fa">uid_t
+ file_uid</var>, <var class="Fa">gid_t file_gid</var>,
+ <var class="Fa">accmode_t accmode</var>, <var class="Fa">struct ucred
+ *cred</var>);</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">This call implements the logic for the
+ <span class="Ux">UNIX</span> discretionary file security model common to
+ many file systems in <span class="Ux">FreeBSD</span>. It accepts the vnodes
+ type <var class="Fa">type</var>, permissions via
+ <var class="Fa">file_mode</var>, owning UID <var class="Fa">file_uid</var>,
+ owning GID <var class="Fa">file_gid</var>, desired access mode
+ <var class="Fa">accmode</var> and requesting credential
+ <var class="Fa">cred</var>.</p>
+<p class="Pp" id="vaccess">This call is intended to support implementations of
+ <a class="Xr">VOP_ACCESS(9)</a>, which will use their own access methods to
+ retrieve the vnode properties, and then invoke
+ <a class="permalink" href="#vaccess"><code class="Fn">vaccess</code></a>()
+ in order to perform the actual check. Implementations of
+ <a class="Xr">VOP_ACCESS(9)</a> may choose to implement additional security
+ mechanisms whose results will be composed with the return value.</p>
+<p class="Pp" id="vaccess~2">The algorithm used by
+ <a class="permalink" href="#vaccess~2"><code class="Fn">vaccess</code></a>()
+ selects a component of the file permission bits based on comparing the
+ passed credential, file owner, and file group. If the credential's effective
+ UID matches the file owner, then the owner component of the permission bits
+ is selected. If the UID does not match, then the credential's effective GID,
+ followed by additional groups, are compared with the file group&#x2014;if
+ there is a match, then the group component of the permission bits is
+ selected. If neither the credential UID or GIDs match the passed file owner
+ and group, then the other component of the permission bits is selected.</p>
+<p class="Pp">Once appropriate protections are selected for the current
+ credential, the requested access mode, in combination with the vnode type,
+ will be compared with the discretionary rights available for the credential.
+ If the rights granted by discretionary protections are insufficient, then
+ super-user privilege, if available for the credential, will also be
+ considered.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
+ VALUES</a></h1>
+<p class="Pp"><code class="Fn">vaccess</code>() will return 0 on success, or a
+ non-zero error value on failure.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
+<dl class="Bl-tag">
+ <dt id="EACCES">[<a class="permalink" href="#EACCES"><code class="Er">EACCES</code></a>]</dt>
+ <dd>Permission denied. An attempt was made to access a file in a way forbidden
+ by its file access permissions.</dd>
+ <dt id="EPERM">[<a class="permalink" href="#EPERM"><code class="Er">EPERM</code></a>]</dt>
+ <dd>Operation not permitted. An attempt was made to perform an operation
+ limited to processes with appropriate privileges or to the owner of a file
+ or other resource.</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">vaccess_acl_nfs4(9)</a>,
+ <a class="Xr">vaccess_acl_posix1e(9)</a>, <a class="Xr">vnode(9)</a>,
+ <a class="Xr">VOP_ACCESS(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 and the current implementation of
+ <code class="Fn">vaccess</code>() were written by <span class="An">Robert
+ Watson</span>.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">August 23, 2022</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>