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 C6C3E139694 for ; Thu, 2 Mar 2017 10:17:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1E3D721C09B; Thu, 2 Mar 2017 10:17:54 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F131C21C09B for ; Thu, 2 Mar 2017 10:17:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC8A63416E4 for ; Thu, 2 Mar 2017 10:17:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4FB6F59AE for ; Thu, 2 Mar 2017 10:17:51 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1488449805.9ae8da19583774e0eccb52e8108e89dfaa513bd7.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/init.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 9ae8da19583774e0eccb52e8108e89dfaa513bd7 X-VCS-Branch: master Date: Thu, 2 Mar 2017 10:17:51 +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-Archives-Salt: 66d31158-81cb-44d5-9f63-bfa6bb062a5f X-Archives-Hash: 15f16cff33f7117137362563f31f22fd commit: 9ae8da19583774e0eccb52e8108e89dfaa513bd7 Author: cgzones googlemail com> AuthorDate: Mon Feb 20 13:24:56 2017 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Mar 2 10:16:45 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=9ae8da19 update init_ACTION_all_units When with systemd a program does not ship a systemd unit file but only a init script, systemd creates a pseudo service on the fly. To be able to act on this service, add the target attribute init_script_file_type to the init_ACTION_all_units interfaces. Useful for monit. policy/modules/system/init.if | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 6a067ab2..195c5fa3 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -2843,11 +2843,11 @@ interface(`init_reload_generic_units',` # interface(`init_get_all_units_status',` gen_require(` - attribute systemdunit; + attribute init_script_file_type, systemdunit; class service status; ') - allow $1 systemdunit:service status; + allow $1 { init_script_file_type systemdunit }:service status; ') ######################################## @@ -2862,11 +2862,11 @@ interface(`init_get_all_units_status',` # interface(`init_start_all_units',` gen_require(` - attribute systemdunit; + attribute init_script_file_type, systemdunit; class service start; ') - allow $1 systemdunit:service start; + allow $1 { init_script_file_type systemdunit }:service start; ') ######################################## @@ -2881,11 +2881,11 @@ interface(`init_start_all_units',` # interface(`init_stop_all_units',` gen_require(` - attribute systemdunit; + attribute init_script_file_type, systemdunit; class service stop; ') - allow $1 systemdunit:service stop; + allow $1 { init_script_file_type systemdunit }:service stop; ') ####################################### @@ -2900,9 +2900,9 @@ interface(`init_stop_all_units',` # interface(`init_reload_all_units',` gen_require(` - attribute systemdunit; + attribute init_script_file_type, systemdunit; class service reload; ') - allow $1 systemdunit:service reload; + allow $1 { init_script_file_type systemdunit }:service reload; ')