condition: detect TOMOYO MAC (#7249)

TOMOYO is a Mandatory Access Control security module for Linux.
Rather than ship rules, TOMOYO features a learning mode.

http://tomoyo.osdn.jp/
http://tomoyo.osdn.jp/2.5/index.html.en
This commit is contained in:
Shawn Landden
2017-11-07 19:12:36 +03:00
committed by Lennart Poettering
parent 4b742c8acd
commit ed440f6be9
5 changed files with 62 additions and 0 deletions
+3
View File
@@ -54,6 +54,7 @@
#include "stat-util.h"
#include "string-table.h"
#include "string-util.h"
#include "tomoyo-util.h"
#include "user-util.h"
#include "util.h"
#include "virt.h"
@@ -301,6 +302,8 @@ static int condition_test_security(Condition *c) {
return use_audit();
if (streq(c->parameter, "ima"))
return use_ima();
if (streq(c->parameter, "tomoyo"))
return mac_tomoyo_use();
return false;
}