Skip to contentSkip to conversation

cannot see boolean variable in /selinux/booleans

DISCUSSION run zhang 1 participant 1 message Oct 12, 2007 SELinux security module

lore
Share & tools
lore

run zhang

author
#0 lore raw

I declear a bool in a simple SELinux policy file (two types and one role). The binary policy is compiled and loaded and runs well. The dmesg shows that "1 bools" in the policy loaded when starts. However, I cannot see the bool variable in /selinux/booleans thus cannot chage its value during runtime . I think some steps are missed. The bool is defined as:
...
type base_t;
type test_t;
bool test_verify false;

if (test_verify) {
allow base_t test_t: file *;
allow base_t test_t: dir *;
}
else {
allow base_t test_t: file { getattr }; allow base_t test_t: dir { getattr read search }; }
...

The msg with getsebool:
getsebool: Unable to get boolean names: Success The msg with setsebool:
Could not change active booleans: Invalid boolean Could not change policy booleans

Thanks!

---------------------------------
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.