diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-23 17:34:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-10-23 17:34:30 +0200 |
commit | 6baa7db00812437bbc87e73faa1a11b6cf631958 (patch) | |
tree | f3c4041b684cd55fe23d06eff9761ab2aca31332 /src/shared/apparmor-util.c | |
parent | cc56fafeebf814ef035e549115cf1850e6473fa5 (diff) |
mac: also rename use_{smack,selinux,apparmor}() calls so that they share the new mac_{smack,selinux,apparmor}_xyz() convention
Diffstat (limited to 'src/shared/apparmor-util.c')
-rw-r--r-- | src/shared/apparmor-util.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/shared/apparmor-util.c b/src/shared/apparmor-util.c index 2b85da1e4a..c14843da49 100644 --- a/src/shared/apparmor-util.c +++ b/src/shared/apparmor-util.c @@ -25,17 +25,16 @@ #include "fileio.h" #include "apparmor-util.h" -static int use_apparmor_cached = -1; +bool mac_apparmor_use(void) { + static int cached_use = -1; -bool use_apparmor(void) { - - if (use_apparmor_cached < 0) { + if (cached_use < 0) { _cleanup_free_ char *p = NULL; - use_apparmor_cached = + cached_use = read_one_line_file("/sys/module/apparmor/parameters/enabled", &p) >= 0 && parse_boolean(p) > 0; } - return use_apparmor_cached; + return cached_use; } |