summaryrefslogtreecommitdiff
path: root/src/test/test-condition.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-27 20:22:56 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-27 20:28:13 +0100
commit6355e75610a8d47fc3ba5ab8bd442172a2cfe574 (patch)
treee71ec8fc1fdb2cef3d06a2b50f1f27b22199391e /src/test/test-condition.c
parent564c44436cf64adc7a9eff8c17f386899194a893 (diff)
downloadsystemd-6355e75610a8d47fc3ba5ab8bd442172a2cfe574.tar.gz
selinux: split up mac_selinux_have() from mac_selinux_use()
Let's distuingish the cases where our code takes an active role in selinux management, or just passively reports whatever selinux properties are set. mac_selinux_have() now checks whether selinux is around for the passive stuff, and mac_selinux_use() for the active stuff. The latter checks the former, plus also checks UID == 0, under the assumption that only when we run priviliged selinux management really makes sense. Fixes: #1941
Diffstat (limited to 'src/test/test-condition.c')
-rw-r--r--src/test/test-condition.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-condition.c b/src/test/test-condition.c
index f224c6cdd8..8903d10db7 100644
--- a/src/test/test-condition.c
+++ b/src/test/test-condition.c
@@ -203,7 +203,7 @@ static void test_condition_test_security(void) {
condition_free(condition);
condition = condition_new(CONDITION_SECURITY, "selinux", false, true);
- assert_se(condition_test(condition) != mac_selinux_use());
+ assert_se(condition_test(condition) != mac_selinux_have());
condition_free(condition);
condition = condition_new(CONDITION_SECURITY, "ima", false, false);