From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-907862-garchives=archives.gentoo.org@lists.gentoo.org>
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 67931138C8E
	for <garchives@archives.gentoo.org>; Mon, 24 Oct 2016 15:46:17 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D9EA2E0AEB;
	Mon, 24 Oct 2016 15:46:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(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 C3A17E0AEB
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 15:46:03 +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 98ACA3415B6
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 15:45:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7785B304
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 15:45:53 +0000 (UTC)
From: "Sven Vermeulen" <swift@gentoo.org>
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" <swift@gentoo.org>
Message-ID: <1477323930.b7fc726a01b14a90222b4686ec185315d3e998fb.swift@gentoo>
Subject: [gentoo-commits] proj/hardened-refpolicy:swift commit in: policy/modules/contrib/
X-VCS-Repository: proj/hardened-refpolicy
X-VCS-Files: policy/modules/contrib/portage.if
X-VCS-Directories: policy/modules/contrib/
X-VCS-Committer: swift
X-VCS-Committer-Name: Sven Vermeulen
X-VCS-Revision: b7fc726a01b14a90222b4686ec185315d3e998fb
X-VCS-Branch: swift
Date: Mon, 24 Oct 2016 15:45:53 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: a090d1e9-4ad0-4817-ab24-288d2175811e
X-Archives-Hash: 99f874fba03bb37c396fb6f3ea2ab859

commit:     b7fc726a01b14a90222b4686ec185315d3e998fb
Author:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  2 15:45:35 2015 +0000
Commit:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 15:45:30 2016 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b7fc726a

REWRITEME Add portage admin interface

 policy/modules/contrib/portage.if | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/policy/modules/contrib/portage.if b/policy/modules/contrib/portage.if
index 14c4fb6..38a31cd 100644
--- a/policy/modules/contrib/portage.if
+++ b/policy/modules/contrib/portage.if
@@ -556,3 +556,33 @@ interface(`portage_dontaudit_write_cache',`
 	dontaudit $1 portage_cache_t:dir { setattr write };
 ')
 
+
+########################################
+## <summary>
+##	Portage (and thus the system software) administration role
+## </summary>
+## <param name="role">
+##	<summary>
+##	Role allowed access
+##	</summary>
+## </param>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access
+##	</summary>
+## </param>
+#
+interface(`portage_admin',`
+	gen_require(`
+		type portage_cache_t, portage_conf_t, portage_db_t, portage_ebuild_t, portage_srcrepo_t, portage_log_t;
+	')
+
+	admin_pattern($1, portage_cache_t)
+	admin_pattern($1, portage_conf_t)
+	admin_pattern($1, portage_db_t)
+	admin_pattern($1, portage_ebuild_t)
+	admin_pattern($1, portage_srcrepo_t)
+	admin_pattern($1, portage_log_t)
+')
+
+