summaryrefslogtreecommitdiffstats
path: root/src/shared/selinux-util.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/shared/selinux-util.c
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/selinux-util.c')
-rw-r--r--src/shared/selinux-util.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
index 2fef29c..d2b1a3e 100644
--- a/src/shared/selinux-util.c
+++ b/src/shared/selinux-util.c
@@ -39,8 +39,6 @@ typedef enum Initialized {
LAZY_INITIALIZED,
} Initialized;
-static int mac_selinux_reload(int seqno);
-
static int cached_use = -1;
static Initialized initialized = UNINITIALIZED;
static int last_policyload = 0;
@@ -214,6 +212,16 @@ int mac_selinux_init_lazy(void) {
return 0;
}
+#if HAVE_SELINUX
+static int mac_selinux_reload(int seqno) {
+ log_debug("SELinux reload %d", seqno);
+
+ (void) open_label_db();
+
+ return 0;
+}
+#endif
+
void mac_selinux_maybe_reload(void) {
#if HAVE_SELINUX
int policyload;
@@ -257,16 +265,6 @@ void mac_selinux_finish(void) {
}
#if HAVE_SELINUX
-static int mac_selinux_reload(int seqno) {
- log_debug("SELinux reload %d", seqno);
-
- (void) open_label_db();
-
- return 0;
-}
-#endif
-
-#if HAVE_SELINUX
static int selinux_fix_fd(
int fd,
const char *label_path,