summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch')
-rw-r--r--external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch b/external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
new file mode 100644
index 00000000..5016f6e7
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
@@ -0,0 +1,45 @@
+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
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ src/systemdhook.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+--- a/src/systemdhook.c
++++ b/src/systemdhook.c
+@@ -16,7 +16,6 @@
+ #include <errno.h>
+ #include <inttypes.h>
+ #include <linux/limits.h>
+-#include <selinux/selinux.h>
+ #include <yajl/yajl_tree.h>
+ #include <stdbool.h>
+
+@@ -129,9 +128,6 @@ static int chperm(const char *path, cons
+ closedir(dir);
+ return -1;
+ }
+- if (setfilecon (full_path, label) < 0) {
+- pr_perror("Failed to set context %s on %s", label, full_path);
+- }
+
+ if (doChown) {
+ /* Change uid and gid to something the container can handle */
+@@ -496,14 +492,6 @@ static int prestart(const char *rootfs,
+ return -1;
+ }
+ }
+-
+- if (strcmp("", mount_label)) {
+- rc = setfilecon(journal_dir, (security_context_t)mount_label);
+- if (rc < 0) {
+- pr_perror("Failed to set journal dir selinux context");
+- return -1;
+- }
+- }
+
+ /* Attempt to creare /var/log/journal inside of rootfs,
+ if successful, or directory exists, mount tmpfs on top of