|
|
05fcafd |
From e8f8394fdbc6869e98a88d63aa16d107e2de0275 Mon Sep 17 00:00:00 2001
|
|
|
05fcafd |
From: Miroslav Grepl <mgrepl@redhat.com>
|
|
|
05fcafd |
Date: Tue, 6 May 2014 15:05:14 +0200
|
|
|
05fcafd |
Subject: [PATCH] Add selinux_openssh_contexts_path()
|
|
|
05fcafd |
|
|
|
05fcafd |
---
|
|
|
05fcafd |
libselinux/include/selinux/selinux.h | 1 +
|
|
|
05fcafd |
libselinux/src/file_path_suffixes.h | 1 +
|
|
|
05fcafd |
libselinux/src/selinux_config.c | 12 ++++++++++--
|
|
|
05fcafd |
libselinux/src/selinux_internal.h | 1 +
|
|
|
05fcafd |
4 files changed, 13 insertions(+), 2 deletions(-)
|
|
|
05fcafd |
|
|
|
05fcafd |
diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
|
|
|
05fcafd |
index 7fff62a..5f4a85e 100644
|
|
|
05fcafd |
--- a/libselinux/include/selinux/selinux.h
|
|
|
05fcafd |
+++ b/libselinux/include/selinux/selinux.h
|
|
|
05fcafd |
@@ -523,6 +523,7 @@ extern const char *selinux_virtual_image_context_path(void);
|
|
|
05fcafd |
extern const char *selinux_lxc_contexts_path(void);
|
|
|
05fcafd |
extern const char *selinux_x_context_path(void);
|
|
|
05fcafd |
extern const char *selinux_sepgsql_context_path(void);
|
|
|
05fcafd |
+extern const char *selinux_openssh_contexts_path(void);
|
|
|
05fcafd |
extern const char *selinux_systemd_contexts_path(void);
|
|
|
05fcafd |
extern const char *selinux_contexts_path(void);
|
|
|
05fcafd |
extern const char *selinux_securetty_types_path(void);
|
|
|
05fcafd |
diff --git a/libselinux/src/file_path_suffixes.h b/libselinux/src/file_path_suffixes.h
|
|
|
05fcafd |
index 3c92424..d1f9b48 100644
|
|
|
05fcafd |
--- a/libselinux/src/file_path_suffixes.h
|
|
|
05fcafd |
+++ b/libselinux/src/file_path_suffixes.h
|
|
|
05fcafd |
@@ -23,6 +23,7 @@ S_(BINPOLICY, "/policy/policy")
|
|
|
05fcafd |
S_(VIRTUAL_DOMAIN, "/contexts/virtual_domain_context")
|
|
|
05fcafd |
S_(VIRTUAL_IMAGE, "/contexts/virtual_image_context")
|
|
|
05fcafd |
S_(LXC_CONTEXTS, "/contexts/lxc_contexts")
|
|
|
05fcafd |
+ S_(OPENSSH_CONTEXTS, "/contexts/openssh_contexts")
|
|
|
05fcafd |
S_(SYSTEMD_CONTEXTS, "/contexts/systemd_contexts")
|
|
|
05fcafd |
S_(FILE_CONTEXT_SUBS, "/contexts/files/file_contexts.subs")
|
|
|
05fcafd |
S_(FILE_CONTEXT_SUBS_DIST, "/contexts/files/file_contexts.subs_dist")
|
|
|
05fcafd |
diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
|
|
|
05fcafd |
index 30e9dc7..2129f26 100644
|
|
|
05fcafd |
--- a/libselinux/src/selinux_config.c
|
|
|
05fcafd |
+++ b/libselinux/src/selinux_config.c
|
|
|
05fcafd |
@@ -50,8 +50,9 @@
|
|
|
05fcafd |
#define FILE_CONTEXT_SUBS_DIST 25
|
|
|
05fcafd |
#define LXC_CONTEXTS 26
|
|
|
05fcafd |
#define BOOLEAN_SUBS 27
|
|
|
05fcafd |
-#define SYSTEMD_CONTEXTS 28
|
|
|
05fcafd |
-#define NEL 29
|
|
|
05fcafd |
+#define OPENSSH_CONTEXTS 28
|
|
|
05fcafd |
+#define SYSTEMD_CONTEXTS 29
|
|
|
05fcafd |
+#define NEL 30
|
|
|
05fcafd |
|
|
|
05fcafd |
/* Part of one-time lazy init */
|
|
|
05fcafd |
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
|
|
05fcafd |
@@ -493,6 +494,13 @@ const char *selinux_lxc_contexts_path(void)
|
|
|
05fcafd |
|
|
|
05fcafd |
hidden_def(selinux_lxc_contexts_path)
|
|
|
05fcafd |
|
|
|
05fcafd |
+const char *selinux_openssh_contexts_path(void)
|
|
|
05fcafd |
+{
|
|
|
05fcafd |
+ return get_path(OPENSSH_CONTEXTS);
|
|
|
05fcafd |
+}
|
|
|
05fcafd |
+
|
|
|
05fcafd |
+hidden_def(selinux_openssh_contexts_path)
|
|
|
05fcafd |
+
|
|
|
05fcafd |
const char *selinux_systemd_contexts_path(void)
|
|
|
05fcafd |
{
|
|
|
05fcafd |
return get_path(SYSTEMD_CONTEXTS);
|
|
|
05fcafd |
diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h
|
|
|
05fcafd |
index afb2170..fe8eb67 100644
|
|
|
05fcafd |
--- a/libselinux/src/selinux_internal.h
|
|
|
05fcafd |
+++ b/libselinux/src/selinux_internal.h
|
|
|
05fcafd |
@@ -82,6 +82,7 @@ hidden_proto(selinux_mkload_policy)
|
|
|
05fcafd |
hidden_proto(selinux_customizable_types_path)
|
|
|
05fcafd |
hidden_proto(selinux_media_context_path)
|
|
|
05fcafd |
hidden_proto(selinux_x_context_path)
|
|
|
05fcafd |
+ hidden_proto(selinux_openssh_contexts_path)
|
|
|
05fcafd |
hidden_proto(selinux_sepgsql_context_path)
|
|
|
05fcafd |
hidden_proto(selinux_systemd_contexts_path)
|
|
|
05fcafd |
hidden_proto(selinux_path)
|
|
|
05fcafd |
--
|
|
|
05fcafd |
1.9.0
|
|
|
05fcafd |
|