From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 266F5138334 for ; Sat, 13 Jul 2019 07:01:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36AA8E07F6; Sat, 13 Jul 2019 07:01:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 16EA2E07F9 for ; Sat, 13 Jul 2019 07:01:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C6C813478FC for ; Sat, 13 Jul 2019 07:01:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 30E806F0 for ; Sat, 13 Jul 2019 07:01:13 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1563000194.eeb241f1c72608674a22fdd992c29709dc52b00f.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/networkmanager.if X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: eeb241f1c72608674a22fdd992c29709dc52b00f X-VCS-Branch: master Date: Sat, 13 Jul 2019 07:01:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: de00b9b1-c447-4ddf-96d1-be8c6edd1fb3 X-Archives-Hash: 824c068947424691ff9331bd2a5e1232 commit: eeb241f1c72608674a22fdd992c29709dc52b00f Author: Dave Sugar tresys com> AuthorDate: Sun Apr 28 14:28:51 2019 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Jul 13 06:43:14 2019 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=eeb241f1 create interfaces for NetworkManager units Create interfaces to allow start/stop, enable/disable and status of NetworkManager systemd unit Signed-off-by: Jason Zaman perfinion.com> policy/modules/services/networkmanager.if | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/policy/modules/services/networkmanager.if b/policy/modules/services/networkmanager.if index 371ebfbd..39ff8cc0 100644 --- a/policy/modules/services/networkmanager.if +++ b/policy/modules/services/networkmanager.if @@ -293,6 +293,63 @@ interface(`networkmanager_stream_connect',` stream_connect_pattern($1, NetworkManager_var_run_t, NetworkManager_var_run_t, NetworkManager_t) ') +######################################## +## +## Allow specified domain to enable/disable NetworkManager units +## +## +## +## Domain allowed access. +## +## +# +interface(`networkmanager_enabledisable',` + gen_require(` + type NetworkManager_unit_t; + class service { enable disable }; + ') + + allow $1 NetworkManager_unit_t:service { enable disable }; +') + +######################################## +## +## Allow specified domain to start/stop NetworkManager units +## +## +## +## Domain allowed access. +## +## +# +interface(`networkmanager_startstop',` + gen_require(` + type NetworkManager_unit_t; + class service { start stop }; + ') + + allow $1 NetworkManager_unit_t:service { start stop }; +') + +######################################## +## +## Allow specified domain to get status of NetworkManager +## +## +## +## Domain allowed access. +## +## +# +interface(`networkmanager_status',` + gen_require(` + type NetworkManager_unit_t; + class service status; + ') + + allow $1 NetworkManager_unit_t:service status; +') + ######################################## ## ## All of the rules required to