aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
blob: d2b192855811de4ae6f1b08844b155a81c4787b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 9b66394c712ec0d0fcb2052baa7f590621a53461 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Tue, 8 Nov 2016 13:15:46 -0500
Subject: [PATCH] selinux: drop selinux support

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 src/systemdhook.c |   12 ------------
 1 file changed, 12 deletions(-)

Index: git/src/systemdhook.c
===================================================================
--- git.orig/src/systemdhook.c
+++ git/src/systemdhook.c
@@ -17,7 +17,6 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <linux/limits.h>
-#include <selinux/selinux.h>
 #include <yajl/yajl_tree.h>
 #include <stdbool.h>
 
@@ -166,12 +165,6 @@
 				closedir(dir);
 				return -1;
 			}
-			if (label != NULL && (strcmp("", label))) {
-				if ((is_selinux_enabled() > 0) && (setfilecon (full_path, label) < 0)) {
-					pr_perror("%s: Failed to set context %s on %s", id, label, full_path);
-				}
-			}
-
 			if (doChown) {
 				/* Change uid and gid to something the container can handle */
 				if (chown(full_path, uid, gid) < 0 ) {
@@ -557,14 +550,6 @@
 				return -1;
 			}
 		}
-
-		if (strcmp("", mount_label)) {
-			if ((is_selinux_enabled() > 0) &&
-			    (setfilecon(journal_dir, (security_context_t)mount_label) < 0)) {
-				pr_perror("%s: Failed to set journal dir selinux context", id);
-				return -1;
-			}
-		}
 
 		/* Attempt to creare /var/log/journal inside of rootfs,
 		   if successful, or directory exists, mount tmpfs on top of