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

114 lines
3.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of security_get_boolean_names</TITLE>
</HEAD><BODY>
<H1>security_get_boolean_names</H1>
Section: SELinux API Documentation (3)<BR>Updated: 15 November 2004<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>
security_set_boolean, security_commit_booleans,
security_get_boolean_names, security_get_boolean_active,
security_get_boolean_pending - routines for manipulating SELinux boolean values
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>#include &lt;<A HREF="file:///usr/include/selinux/selinux.h">selinux/selinux.h</A>&gt;</B>
<P>
<B>int security_get_boolean_names(char ***</B><I>names</I><B>, int *</B><I>len</I><B>);</B>
<P>
<B>int security_get_boolean_pending(const char *</B><I>name</I><B>);</B>
<P>
<B>int security_get_boolean_active(const char *</B><I>name</I><B>);</B>
<P>
<B>int security_set_boolean(const char *</B><I>name</I><B>, int </B><I>value</I><B>);</B>
<P>
<B>int security_set_boolean_list(size_t </B><I>boolcnt</I><B>, SELboolean *</B><I>boollist</I><B>, int </B><I>permanent</I><B>);</B>
<P>
<B>int security_commit_booleans(void);</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The SELinux policy can include conditional rules that are enabled or
disabled based on the current values of a set of policy booleans.
These policy booleans allow runtime modification of the security
policy without having to load a new policy.
<P>
The SELinux API allows for a transaction based update. So you can
set several boolean values and then commit them all at once.
<P>
<B>security_get_boolean_names</B>()
provides a list of boolean names, currently supported by the loaded policy.
<P>
<B>security_get_boolean_pending</B>()
returns the pending value for boolean or -1 on failure.
<P>
<B>security_get_boolean_active</B>()
returns the active value for boolean or -1 on failure.
<P>
<B>security_set_boolean</B>()
sets the pending value for boolean
<P>
<B>security_set_boolean_list</B>()
saves a list of booleans in a single transaction. Note that the
<B>int</B><I> permanent </I>
flag is deprecated and should be set to zero.
<P>
<B>security_commit_booleans</B>()
commits all pending values for the booleans.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
Where not otherwise stated, functions described in this manual page return
zero on success or -1 on error.
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
This manual page was written by Dan Walsh &lt;<A HREF="mailto:dwalsh@redhat.com">dwalsh@redhat.com</A>&gt;.
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+selinux">selinux</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+getsebool">getsebool</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+booleans">booleans</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+togglesebool">togglesebool</A></B>(8)
<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">AUTHOR</A><DD>
<DT id="6"><A HREF="#lbAG">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>