2018-06-08 09:52:56

by Jason Zaman

[permalink] [raw]
Subject: [refpolicy] [PATCH] corecommands: adjust gcc fcontext to also work on musl

---
policy/modules/kernel/corecommands.fc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
index f2e4f511..9a371606 100644
--- a/policy/modules/kernel/corecommands.fc
+++ b/policy/modules/kernel/corecommands.fc
@@ -346,8 +346,10 @@ ifdef(`distro_debian',`
')

ifdef(`distro_gentoo', `
-/usr/.*-.*-linux-gnu/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
-/usr/.*-.*-linux-gnu/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
+/usr/[^/-]+-[^/-]+-linux-[^/-]+/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
+/usr/[^/-]+-[^/-]+-linux-[^/-]+/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
+/usr/[^/-]+-[^/-]+-linux-[^/-]+/[^/]+/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
+/usr/[^/-]+-[^/-]+-linux-[^/-]+/[^/]+/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)

/usr/lib/rcscripts/addons(/.*)? gen_context(system_u:object_r:bin_t,s0)
/usr/lib/rcscripts/sh(/.*)? gen_context(system_u:object_r:bin_t,s0)
--
2.16.4


2018-06-10 17:04:46

by Chris PeBenito

[permalink] [raw]
Subject: [refpolicy] [PATCH] corecommands: adjust gcc fcontext to also work on musl

On 06/08/2018 05:52 AM, Jason Zaman wrote:
> ---
> policy/modules/kernel/corecommands.fc | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
> index f2e4f511..9a371606 100644
> --- a/policy/modules/kernel/corecommands.fc
> +++ b/policy/modules/kernel/corecommands.fc
> @@ -346,8 +346,10 @@ ifdef(`distro_debian',`
> ')
>
> ifdef(`distro_gentoo', `
> -/usr/.*-.*-linux-gnu/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
> -/usr/.*-.*-linux-gnu/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
> +/usr/[^/-]+-[^/-]+-linux-[^/-]+/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
> +/usr/[^/-]+-[^/-]+-linux-[^/-]+/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
> +/usr/[^/-]+-[^/-]+-linux-[^/-]+/[^/]+/gcc-bin/.*(/.*)? gen_context(system_u:object_r:bin_t,s0)
> +/usr/[^/-]+-[^/-]+-linux-[^/-]+/[^/]+/binutils-bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
>
> /usr/lib/rcscripts/addons(/.*)? gen_context(system_u:object_r:bin_t,s0)
> /usr/lib/rcscripts/sh(/.*)? gen_context(system_u:object_r:bin_t,s0)

Merged.

--
Chris PeBenito