commit: 97e7530c5e79281a24499ac28edcf35daa2349c2 Author: David Sugar <dsugar <AT> tresys <DOT> com> AuthorDate: Sat Nov 17 04:23:43 2018 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Sun Nov 18 10:56:47 2018 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=97e7530c
interface to enable/disable systemd_networkd service Signed-off-by: Dave Sugar <dsugar <AT> tresys.com> Signed-off-by: Jason Zaman <jason <AT> perfinion.com> policy/modules/system/systemd.if | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index 9247924b..74f0b215 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -467,6 +467,25 @@ interface(`systemd_manage_networkd_units',` manage_files_pattern($1, systemd_networkd_unit_t, systemd_networkd_unit_t) ') +######################################## +## <summary> +## Allow specified domain to enable systemd-networkd units +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`systemd_enabledisable_networkd',` + gen_require(` + type systemd_networkd_unit_t; + class service { enable disable }; + ') + + allow $1 systemd_networkd_unit_t:service { enable disable }; +') + ######################################## ## <summary> ## Allow specified domain to start systemd-networkd units