diff mbox series

[meta-selinux,1/1] Add SELinux specific configuration snippet for busybox.

Message ID 20240624090200.1746755-2-pascal.weisser.ext@karlstorz.com
State New
Headers show
Series Add SELinux specific configuration snippet for busybox. | expand

Commit Message

Weisser, Pascal June 24, 2024, 9:02 a.m. UTC
This patch adds a SELinux specific configuration snippet for busybox to
enable SELinux support in busybox out of the box. This is needed to enable
SELinux specific command line options for certain commands like ps -Z.

Signed-off-by: "Weisser, Pascal" <pascal.weisser.ext@karlstorz.com>
---
 recipes-core/busybox/busybox_selinux.inc | 6 ++++++
 recipes-core/busybox/files/selinux.cfg   | 1 +
 2 files changed, 7 insertions(+)
 create mode 100644 recipes-core/busybox/files/selinux.cfg

Comments

Yi Zhao June 25, 2024, 1:35 p.m. UTC | #1
LGTM.


Thanks,

Yi

On 6/24/24 17:02, Weisser, Pascal.ext via lists.yoctoproject.org wrote:
> This patch adds a SELinux specific configuration snippet for busybox to
> enable SELinux support in busybox out of the box. This is needed to enable
> SELinux specific command line options for certain commands like ps -Z.
>
> Signed-off-by: "Weisser, Pascal" <pascal.weisser.ext@karlstorz.com>
> ---
>   recipes-core/busybox/busybox_selinux.inc | 6 ++++++
>   recipes-core/busybox/files/selinux.cfg   | 1 +
>   2 files changed, 7 insertions(+)
>   create mode 100644 recipes-core/busybox/files/selinux.cfg
>
> diff --git a/recipes-core/busybox/busybox_selinux.inc b/recipes-core/busybox/busybox_selinux.inc
> index 740980f..ade30cf 100644
> --- a/recipes-core/busybox/busybox_selinux.inc
> +++ b/recipes-core/busybox/busybox_selinux.inc
> @@ -1,3 +1,9 @@
> +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> +
> +SRC_URI:append = " file://selinux.cfg"
> +
> +DEPENDS:append  = " libselinux"
> +
>   PTEST_BINDIR = "0"
>   
>   FILES:${PN} += "${libdir}/${PN}"
> diff --git a/recipes-core/busybox/files/selinux.cfg b/recipes-core/busybox/files/selinux.cfg
> new file mode 100644
> index 0000000..00aeb51
> --- /dev/null
> +++ b/recipes-core/busybox/files/selinux.cfg
> @@ -0,0 +1 @@
> +CONFIG_SELINUX=y
diff mbox series

Patch

diff --git a/recipes-core/busybox/busybox_selinux.inc b/recipes-core/busybox/busybox_selinux.inc
index 740980f..ade30cf 100644
--- a/recipes-core/busybox/busybox_selinux.inc
+++ b/recipes-core/busybox/busybox_selinux.inc
@@ -1,3 +1,9 @@ 
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append = " file://selinux.cfg"
+
+DEPENDS:append  = " libselinux"
+
 PTEST_BINDIR = "0"
 
 FILES:${PN} += "${libdir}/${PN}"
diff --git a/recipes-core/busybox/files/selinux.cfg b/recipes-core/busybox/files/selinux.cfg
new file mode 100644
index 0000000..00aeb51
--- /dev/null
+++ b/recipes-core/busybox/files/selinux.cfg
@@ -0,0 +1 @@ 
+CONFIG_SELINUX=y