X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fsmack-util.c;h=a8f29acfa34ce132f1f5edc4d36275b08abb1ca4;hp=9e221d6eab3879eb40c07e404a4932141fab6f02;hb=eaca07ccfdf5d7dabc50afc7e539c2413dd69d3e;hpb=e50b9bfa20b2f3aa0d29a956b1f9307f0e2a0db0 diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c index 9e221d6ea..a8f29acfa 100644 --- a/src/basic/smack-util.c +++ b/src/basic/smack-util.c @@ -23,14 +23,14 @@ #include -#include "util.h" -#include "process-util.h" -#include "path-util.h" +#include "alloc-util.h" #include "fileio.h" +#include "path-util.h" +#include "process-util.h" #include "smack-util.h" - -#define SMACK_FLOOR_LABEL "_" -#define SMACK_STAR_LABEL "*" +#include "string-table.h" +#include "util.h" +#include "xattr-util.h" #ifdef HAVE_SMACK bool mac_smack_use(void) { @@ -42,6 +42,8 @@ bool mac_smack_use(void) { return cached_use; } +/// UNNEEDED by elogind +#if 0 static const char* const smack_attr_table[_SMACK_ATTR_MAX] = { [SMACK_ATTR_ACCESS] = "security.SMACK64", [SMACK_ATTR_EXEC] = "security.SMACK64EXEC", @@ -129,6 +131,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { return r; } +#endif // 0 int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { struct stat st; @@ -185,6 +188,8 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { return r; } +/// UNNEEDED by elogind +#if 0 int mac_smack_copy(const char *dest, const char *src) { int r = 0; _cleanup_free_ char *label = NULL; @@ -202,12 +207,15 @@ int mac_smack_copy(const char *dest, const char *src) { return r; } +#endif // 0 #else bool mac_smack_use(void) { return false; } +/// UNNEEDED by elogind +#if 0 int mac_smack_read(const char *path, SmackAttr attr, char **label) { return -EOPNOTSUPP; } @@ -227,12 +235,16 @@ int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label) { int mac_smack_apply_pid(pid_t pid, const char *label) { return 0; } +#endif // 0 int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { return 0; } +/// UNNEEDED by elogind +#if 0 int mac_smack_copy(const char *dest, const char *src) { return 0; } +#endif // 0 #endif