From ba9fa00010ec24df57fbc77d94be208e6ae2908a Mon Sep 17 00:00:00 2001 From: Krzysztof Nowicki Date: Tue, 11 Aug 2020 14:53:18 +0200 Subject: [PATCH] Allow execution of shell-scripted systemd generators While systemd recommends to use native binaries as generators due to performance reasons, there is nothing that really prevents from them being shell scripts. This is Gentoo-specific as the affected generator is provided by the distribution, not by upstream systemd. Signed-off-by: Krzysztof Nowicki --- policy/modules/system/systemd.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index 8ec415d0b..5d34e6d2e 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -443,6 +443,10 @@ systemd_log_parse_environment(systemd_generator_t) term_use_unallocated_ttys(systemd_generator_t) +ifdef(`distro_gentoo',` + corecmd_shell_entry_type(systemd_generator_t) +') + optional_policy(` fstools_exec(systemd_generator_t) ')