chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
condition, man: Add support for ConditionSecurity=apparmor
[elogind.git]
/
src
/
core
/
condition.c
diff --git
a/src/core/condition.c
b/src/core/condition.c
index 30199c10e3bbbeedab5ec05d05db37cdd21b4e2b..4aa5530c3645b8ba7ddc9f01789d7e73182da366 100644
(file)
--- a/
src/core/condition.c
+++ b/
src/core/condition.c
@@
-162,6
+162,8
@@
static bool test_security(const char *parameter) {
if (streq(parameter, "selinux"))
return is_selinux_enabled() > 0;
#endif
+ if (streq(parameter, "apparmor"))
+ return access("/sys/kernel/security/apparmor/", F_OK) == 0;
return false;
}