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/smack-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/smack-util.c')
-rw-r--r-- | src/shared/smack-util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c index 33e1cd849e..0bedd75081 100644 --- a/src/shared/smack-util.c +++ b/src/shared/smack-util.c @@ -27,14 +27,14 @@ #include "path-util.h" #include "smack-util.h" -bool use_smack(void) { +bool mac_smack_use(void) { #ifdef HAVE_SMACK - static int use_smack_cached = -1; + static int cached_use = -1; - if (use_smack_cached < 0) - use_smack_cached = access("/sys/fs/smackfs/", F_OK) >= 0; + if (cached_use < 0) + cached_use = access("/sys/fs/smackfs/", F_OK) >= 0; - return use_smack_cached; + return cached_use; #else return false; #endif @@ -43,7 +43,7 @@ bool use_smack(void) { int mac_smack_set_path(const char *path, const char *label) { #ifdef HAVE_SMACK - if (!use_smack()) + if (!mac_smack_use()) return 0; if (label) @@ -57,7 +57,7 @@ int mac_smack_set_path(const char *path, const char *label) { int mac_smack_set_fd(int fd, const char *label) { #ifdef HAVE_SMACK - if (!use_smack()) + if (!mac_smack_use()) return 0; return fsetxattr(fd, "security.SMACK64", label, strlen(label), 0); @@ -68,7 +68,7 @@ int mac_smack_set_fd(int fd, const char *label) { int mac_smack_set_ip_out_fd(int fd, const char *label) { #ifdef HAVE_SMACK - if (!use_smack()) + if (!mac_smack_use()) return 0; return fsetxattr(fd, "security.SMACK64IPOUT", label, strlen(label), 0); @@ -79,7 +79,7 @@ int mac_smack_set_ip_out_fd(int fd, const char *label) { int mac_smack_set_ip_in_fd(int fd, const char *label) { #ifdef HAVE_SMACK - if (!use_smack()) + if (!mac_smack_use()) return 0; return fsetxattr(fd, "security.SMACK64IPIN", label, strlen(label), 0); |