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=9bcc4a3a200171f9a6f36367ebc99b52959977f3;hp=5f570ff02ae11c27fa620f05ab519230d86c6296;hb=844d57fd5de46b45d8610d296dc5e20d749eff11;hpb=64b485bf89b90042c9a624633b038ef417b0325e
diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
index 5f570ff02..9bcc4a3a2 100644
--- a/src/basic/smack-util.c
+++ b/src/basic/smack-util.c
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
@@ -21,13 +19,21 @@
along with systemd; If not, see .
***/
+#include
+#include
+#include
#include
+#include
-#include "util.h"
-#include "process-util.h"
-#include "path-util.h"
+#include "alloc-util.h"
#include "fileio.h"
+#include "log.h"
+#include "macro.h"
+#include "path-util.h"
+#include "process-util.h"
#include "smack-util.h"
+#include "string-table.h"
+#include "xattr-util.h"
#ifdef HAVE_SMACK
bool mac_smack_use(void) {
@@ -39,6 +45,7 @@ bool mac_smack_use(void) {
return cached_use;
}
+#if 0 /// UNNEEDED by elogind
static const char* const smack_attr_table[_SMACK_ATTR_MAX] = {
[SMACK_ATTR_ACCESS] = "security.SMACK64",
[SMACK_ATTR_EXEC] = "security.SMACK64EXEC",
@@ -126,6 +133,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;
@@ -182,6 +190,7 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
return r;
}
+#if 0 /// UNNEEDED by elogind
int mac_smack_copy(const char *dest, const char *src) {
int r = 0;
_cleanup_free_ char *label = NULL;
@@ -199,12 +208,14 @@ int mac_smack_copy(const char *dest, const char *src) {
return r;
}
+#endif // 0
#else
bool mac_smack_use(void) {
return false;
}
+#if 0 /// UNNEEDED by elogind
int mac_smack_read(const char *path, SmackAttr attr, char **label) {
return -EOPNOTSUPP;
}
@@ -224,12 +235,15 @@ 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;
}
+#if 0 /// UNNEEDED by elogind
int mac_smack_copy(const char *dest, const char *src) {
return 0;
}
+#endif // 0
#endif