1security_get_boolean_names(3S)ELinux API Documentatisoencurity_get_boolean_names(3)
2
3
4
6 security_set_boolean, security_commit_booleans, security_get_bool‐
7 ean_names, security_get_boolean_active, security_get_boolean_pending -
8 routines for manipulating SELinux boolean values
9
11 #include <selinux/selinux.h>
12
13 int security_get_boolean_names(char ***names, int *len);
14
15 int security_get_boolean_pending(const char *name);
16
17 int security_get_boolean_active(const char *name);
18
19 int security_set_boolean(const char *name, int value);
20
21 int security_set_boolean_list(size_t boolcnt, SELboolean *boollist, int
22 permanent);
23
24 int security_commit_booleans(void);
25
27 The SELinux policy can include conditional rules that are enabled or
28 disabled based on the current values of a set of policy booleans.
29 These policy booleans allow runtime modification of the security policy
30 without having to load a new policy.
31
32 The SELinux API allows for a transaction based update. So you can set
33 several boolean values and then commit them all at once.
34
35 security_get_boolean_names() provides a list of boolean names, cur‐
36 rently supported by the loaded policy.
37
38 security_get_boolean_pending() returns the pending value for boolean or
39 -1 on failure.
40
41 security_get_boolean_active() returns the active value for boolean or
42 -1 on failure.
43
44 security_set_boolean() sets the pending value for boolean
45
46 security_set_boolean_list() saves a list of booleans in a single trans‐
47 action. Note that the int permanent flag is deprecated and should be
48 set to zero.
49
50 security_commit_booleans() commits all pending values for the booleans.
51
53 Where not otherwise stated, functions described in this manual page
54 return zero on success or -1 on error.
55
57 This manual page was written by Dan Walsh <dwalsh@redhat.com>.
58
60 selinux(8), getsebool(8), booleans(8), togglesebool(8)
61
62
63
64dwalsh@redhat.com 15 November 2004 security_get_boolean_names(3)