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

65 lines
1.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of sepol_check_context</TITLE>
</HEAD><BODY>
<H1>sepol_check_context</H1>
Section: SE Linux binary policy API documentation (3)<BR>Updated: 15 March 2005<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
sepol_check_context - Check the validity of a security context against a binary policy.
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>#include &lt;<A HREF="file:///usr/include/sepol/sepol.h">sepol/sepol.h</A>&gt;</B>
<P>
<B>int sepol_check_context(const char *</B><I>context</I><B>);</B>
<P>
<B>int sepol_set_policydb_from_file(FILE *</B><I>fp</I><B>);</B>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>sepol_check_context</B>
checks the validity of a security context against a binary policy
previously loaded from a file via
<B>sepol_set_policydb_from_file.</B>
It is used by
<B>setfiles -c</B>
to validate a file contexts configuration against the binary policy
upon policy builds. For validating a context against the active
policy on a SELinux system, use
<B>security_check_context</B>
from libselinux instead.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
Returns 0 on success or -1 with errno set otherwise.
<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>
</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>