| 1 |
.TH "security_get_boolean_names" "3" "15 November 2004" "[email protected]" "SELinux API Documentation" |
| 2 |
.SH "NAME" |
| 3 |
security_load_booleans, security_set_boolean, security_commit_booleans, |
| 4 |
security_get_boolean_names, security_get_boolean_active, |
| 5 |
security_get_boolean_pending \- routines for manipulating SELinux boolean values |
| 6 |
. |
| 7 |
.SH "SYNOPSIS" |
| 8 |
.B #include <selinux/selinux.h> |
| 9 |
.sp |
| 10 |
.BI "int security_load_booleans(char *" path ");" |
| 11 |
.sp |
| 12 |
.BI "int security_get_boolean_names(char ***" names ", int *" len ");" |
| 13 |
.sp |
| 14 |
.BI "int security_get_boolean_pending(const char *" name ");" |
| 15 |
.sp |
| 16 |
.BI "int security_get_boolean_active(const char *" name ");" |
| 17 |
.sp |
| 18 |
.BI "int security_set_boolean(const char *" name ", int " value ");" |
| 19 |
.sp |
| 20 |
.BI "int security_set_boolean_list(size_t " boolcnt ", SELboolean *" boollist ", int " permanent ");" |
| 21 |
.sp |
| 22 |
.BI "int security_commit_booleans(void);" |
| 23 |
. |
| 24 |
.SH "DESCRIPTION" |
| 25 |
The SELinux policy can include conditional rules that are enabled or |
| 26 |
disabled based on the current values of a set of policy booleans. |
| 27 |
These policy booleans allow runtime modification of the security |
| 28 |
policy without having to load a new policy. |
| 29 |
|
| 30 |
The SELinux API allows for a transaction based update. So you can |
| 31 |
set several boolean values and then commit them all at once. |
| 32 |
|
| 33 |
.BR security_load_booleans () |
| 34 |
loads policy boolean settings. Path may be NULL, in which case the |
| 35 |
booleans are loaded from the active policy boolean configuration file. |
| 36 |
|
| 37 |
.BR security_get_boolean_names () |
| 38 |
provides a list of boolean names, currently supported by the loaded policy. |
| 39 |
|
| 40 |
.BR security_get_boolean_pending () |
| 41 |
returns the pending value for boolean or \-1 on failure. |
| 42 |
|
| 43 |
.BR security_get_boolean_active () |
| 44 |
returns the active value for boolean or \-1 on failure. |
| 45 |
|
| 46 |
.BR security_set_boolean () |
| 47 |
sets the pending value for boolean |
| 48 |
|
| 49 |
.BR security_set_boolean_list () |
| 50 |
saves a list of booleans in a single transaction. |
| 51 |
|
| 52 |
.BR security_commit_booleans () |
| 53 |
commits all pending values for the booleans. |
| 54 |
. |
| 55 |
.SH "RETURN VALUE" |
| 56 |
Where not otherwise stated, functions described in this manual page return |
| 57 |
zero on success or \-1 on error. |
| 58 |
. |
| 59 |
.SH AUTHOR |
| 60 |
This manual page was written by Dan Walsh <[email protected]>. |
| 61 |
. |
| 62 |
.SH "SEE ALSO" |
| 63 |
.BR selinux (8), |
| 64 |
.BR getsebool (8), |
| 65 |
.BR booleans (8), |
| 66 |
.BR togglesebool (8) |