new file mode 100644
@@ -0,0 +1,30 @@
+From 75ad7b87b85a3fb0f0d00b88831a3171a01e8fa0 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Fri, 15 Nov 2019 16:07:30 +0800
+Subject: [PATCH] fc/corecommands: label start_getty as bin_t
+
+start_getty is a wrapper script, so it must not inherit getty_exec_t
+from the /usr/bin/.*getty pattern. bin_t is declared in corecommands,
+hence the label belongs in that module's file context.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ policy/modules/kernel/corecommands.fc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
+index 110e7471d..3b13d3ba8 100644
+--- a/policy/modules/kernel/corecommands.fc
++++ b/policy/modules/kernel/corecommands.fc
+@@ -178,6 +178,7 @@ ifdef(`distro_gentoo',`
+ /usr/bin/scponlyc -- gen_context(system_u:object_r:shell_exec_t,s0)
+ /usr/bin/sh -- gen_context(system_u:object_r:shell_exec_t,s0)
+ /usr/bin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0)
++/usr/bin/start_getty -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/bin/tcsh -- gen_context(system_u:object_r:shell_exec_t,s0)
+ /usr/bin/yash -- gen_context(system_u:object_r:shell_exec_t,s0)
+ /usr/bin/zsh.* -- gen_context(system_u:object_r:shell_exec_t,s0)
+--
+2.34.1
deleted file mode 100644
@@ -1,27 +0,0 @@
-From 75ad7b87b85a3fb0f0d00b88831a3171a01e8fa0 Mon Sep 17 00:00:00 2001
-From: Yi Zhao <yi.zhao@windriver.com>
-Date: Fri, 15 Nov 2019 16:07:30 +0800
-Subject: [PATCH] fc/getty: add file context to start_getty
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- policy/modules/system/getty.fc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/policy/modules/system/getty.fc b/policy/modules/system/getty.fc
-index c7701c930..8b70b609a 100644
---- a/policy/modules/system/getty.fc
-+++ b/policy/modules/system/getty.fc
-@@ -4,6 +4,7 @@
- /run/agetty\.reload -- gen_context(system_u:object_r:getty_runtime_t,s0)
-
- /usr/bin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0)
-+/usr/bin/start_getty -- gen_context(system_u:object_r:bin_t,s0)
-
-
- /var/log/mgetty\.log.* -- gen_context(system_u:object_r:getty_log_t,s0)
-2.34.1
-
@@ -38,7 +38,7 @@ SRC_URI += " \
file://0020-fc-ldap-apply-policy-to-ldap-alternatives.patch \
file://0021-fc-postgresql-apply-policy-to-postgresql-alternative.patch \
file://0022-fc-usermanage-apply-policy-to-usermanage-alternative.patch \
- file://0023-fc-getty-add-file-context-to-start_getty.patch \
+ file://0023-fc-corecommands-label-start_getty-as-bin_t.patch \
file://0024-fc-vlock-apply-policy-to-vlock-alternatives.patch \
file://0025-fc-add-fcontext-for-init-scripts-and-systemd-service.patch \
file://0026-file_contexts.subs_dist-set-aliase-for-root-director.patch \