aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrea Claudi <aclaudi@redhat.com>2023-08-23 19:30:01 +0200
committerDavid Ahern <dsahern@kernel.org>2023-08-24 17:34:31 -0700
commite246ebc3b7f1f438310ad6fd1d5976ba6ccf7a69 (patch)
tree2f749c23895871f80a612072b42c01af63266a54 /include
parent61c6882ce21c1247c06cd61783120be0a2e2019c (diff)
downloadiproute2-e246ebc3b7f1f438310ad6fd1d5976ba6ccf7a69.tar.gz
lib: add SELinux include and stub functions
ss provides some selinux stub functions, useful when iproute2 is compiled without selinux support. Move them to lib/ so we can use them in other iproute2 tools. Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/selinux.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/selinux.h b/include/selinux.h
new file mode 100644
index 000000000..499aa966a
--- /dev/null
+++ b/include/selinux.h
@@ -0,0 +1,9 @@
+#if HAVE_SELINUX
+#include <selinux/selinux.h>
+#else
+int is_selinux_enabled(void);
+void freecon(char *context);
+int getpidcon(pid_t pid, char **context);
+int getfilecon(const char *path, char **context);
+int security_get_initial_context(const char *name, char **context);
+#endif