man-pages/man3/selinux_restorecon_default_handle.3.html
2021-03-31 01:06:50 +01:00

125 lines
3.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of selinux_restorecon_default_handle</TITLE>
</HEAD><BODY>
<H1>selinux_restorecon_default_handle</H1>
Section: SELinux API documentation (3)<BR>Updated: 20 Oct 2015<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
selinux_restorecon_default_handle - sets default parameters for
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3)
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>#include &lt;<A HREF="file:///usr/include/selinux/restorecon.h">selinux/restorecon.h</A>&gt;</B>
<BR>
<B>#include &lt;<A HREF="file:///usr/include/selinux/label.h">selinux/label.h</A>&gt;</B>
<P>
<B>struct selabel_handle *selinux_restorecon_default_handle(void);</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>selinux_restorecon_default_handle</B>()
sets default parameters for
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3)
by calling
<B><A HREF="/cgi-bin/man/man2html?3+selabel_open">selabel_open</A></B>(3)
with the
<B>SELABEL_OPT_DIGEST</B>
option only. This will enable a digest to be calculated on the currently
loaded policy
<B><A HREF="/cgi-bin/man/man2html?5+file_contexts">file_contexts</A></B>(5)
set of files as described in the
<B>NOTES</B>
section of
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3).
<P>
Calling
<B>selinux_restorecon_default_handle</B>()
is optional, however if used then
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_sehandle">selinux_restorecon_set_sehandle</A></B>(3)
should be called with the returned handle to set this for use by
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3).
<P>
<B>selinux_restorecon_default_handle</B>()
is optional as
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3)
will automatically call this and
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_sehandle">selinux_restorecon_set_sehandle</A></B>(3)
provided a handle has not already been set, for
example by
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_sehandle">selinux_restorecon_set_sehandle</A></B>(3)
to set customised
<B><A HREF="/cgi-bin/man/man2html?3+selabel_open">selabel_open</A></B>(3)
parameters.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
A non-NULL handle value is returned on success. On error, NULL is returned and
<I>errno</I>
is set appropriately.
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon">selinux_restorecon</A></B>(3),
<BR>
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_sehandle">selinux_restorecon_set_sehandle</A></B>(3),
<BR>
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_exclude_list">selinux_restorecon_set_exclude_list</A></B>(3),
<BR>
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_set_alt_rootpath">selinux_restorecon_set_alt_rootpath</A></B>(3),
<BR>
<B><A HREF="/cgi-bin/man/man2html?3+selinux_restorecon_xattr">selinux_restorecon_xattr</A></B>(3)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DT id="5"><A HREF="#lbAF">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:56 GMT, March 31, 2021
</BODY>
</HTML>