diff options
Diffstat (limited to 'static/freebsd/man9/VOP_SETLABEL.9 3.html')
| -rw-r--r-- | static/freebsd/man9/VOP_SETLABEL.9 3.html | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/static/freebsd/man9/VOP_SETLABEL.9 3.html b/static/freebsd/man9/VOP_SETLABEL.9 3.html deleted file mode 100644 index 83f28b88..00000000 --- a/static/freebsd/man9/VOP_SETLABEL.9 3.html +++ /dev/null @@ -1,127 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">VOP_SETLABEL(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">VOP_SETLABEL(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_SETLABEL</code> — - <span class="Nd">persistently store an updated MAC label on 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 - <<a class="In">sys/param.h</a>></code> - <br/> - <code class="In">#include <<a class="In">sys/vnode.h</a>></code> - <br/> - <code class="In">#include <<a class="In">security/mac.h</a>></code></p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">VOP_SETLABEL</code>(<var class="Fa" style="white-space: nowrap;">struct - vnode *vp</var>, <var class="Fa" style="white-space: nowrap;">label - *label</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 is made by <a class="Xr">mac(9)</a> file - relabeling operation has been authorized, and the filesystem must now be - updated.</p> -<section class="Ss"> -<h2 class="Ss" id="Single-Label_vs._Multi-Label_Filesystems"><a class="permalink" href="#Single-Label_vs._Multi-Label_Filesystems">Single-Label - vs. Multi-Label Filesystems</a></h2> -<p class="Pp">Filesystems that do not implement per-file labels -- known as - single-label filesystems -- can simply leave the <a class="Xr">vnode(9)</a> - operation undefined. These filesystems must not set the - <code class="Dv">MNT_MULTLABEL</code> flag in their <var class="Vt">struct - mount</var>.</p> -<p class="Pp">Filesystems that do implement per-vnode label storage -- known as - multi-label filesystems -- will set the - <code class="Dv">MNT_MULTILABEL</code> flag in their <var class="Vt">struct - mount</var>. The UFS filesystem uses a superblock flag to persisently - configure whether a specific filesystem implements a label for each - <a class="Xr">vnode(9)</a>, and then keys various behaviors on whether that - flag is set.</p> -</section> -<section class="Ss"> -<h2 class="Ss" id="Extended_Attributes"><a class="permalink" href="#Extended_Attributes">Extended - Attributes</a></h2> -<p class="Pp">If the filesystem implements extended attributes, then the MAC - Framework's - <a class="permalink" href="#vop_stdsetlabel_ea"><code class="Fn" id="vop_stdsetlabel_ea">vop_stdsetlabel_ea</code></a>() - function can be used, and maps operations into a series of - <a class="Xr">VOP_OPENEXTATTR(9)</a>, <a class="Xr">VOP_WRITEEXTATTR(9)</a>, - and <a class="Xr">VOP_CLOSEEXTATTR(9)</a>.</p> -<p class="Pp" id="mac_vnode_create_extattr">Filesystems will also need to call - <a class="permalink" href="#mac_vnode_create_extattr"><code class="Fn">mac_vnode_create_extattr</code></a>() - when a new filesystem object is created, so that suitable extended - attributes can be written out, and - <a class="permalink" href="#mac_vnode_associate_extattr"><code class="Fn" id="mac_vnode_associate_extattr">mac_vnode_associate_extattr</code></a>() - when a <a class="Xr">vnode(9)</a> is associated with a filesystem object for - the first time. These utility functions use - <a class="Xr">VOP_OPENEXTATTR(9)</a>, <a class="Xr">VOP_READEXTATTR(9)</a>, - <a class="Xr">VOP_WRITEEXTATTR(9)</a>, and - <a class="Xr">VOP_CLOSEEXTATTR(9)</a> as required.</p> -</section> -<section class="Ss"> -<h2 class="Ss" id="Locking_and_Crash_Safety"><a class="permalink" href="#Locking_and_Crash_Safety">Locking - and Crash Safety</a></h2> -<p class="Pp">In all cases, it is important that exclusive - <a class="Xr">vnode(9)</a> locks be held to prevent concurrent access when a - MAC label may not yet be initialized. It is also important that operations - are ordered so that a system crash does not leave a file improperly labeled. - For example, the extended attribute for a newly created file must be written - to disk before the file is linked by its parent directory, so that there is - no opportunity for a crash to lead to an unlabeled file.</p> -</section> -</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 MAC label 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="EOPNOTSUPP">[<a class="permalink" href="#EOPNOTSUPP"><code class="Er">EOPNOTSUPP</code></a>]</dt> - <dd>The file system does not support - <code class="Fn">VOP_SETLABEL</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> -<p class="Pp">Depending on the underlying implementation of - <code class="Fn">VOP_SETLABEL</code>(), other errors may also be - possible.</p> -</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">mac(9)</a>, <a class="Xr">mount(9)</a>, - <a class="Xr">vnode(9)</a>, <a class="Xr">VOP_CLOSEEXTATTR(9)</a>, - <a class="Xr">VOP_OPENEXTATTR(9)</a>, <a class="Xr">VOP_READEXTATTR(9)</a>, - <a class="Xr">VOP_WRITEXTATTR(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">February 27, 2021</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
