From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-620073-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id C7DD91381F3
	for <garchives@archives.gentoo.org>; Sat, 17 Aug 2013 18:12:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5D0D2E0AFB;
	Sat, 17 Aug 2013 18:12:48 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id EDC0AE0AFB
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Aug 2013 18:12:47 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id F148B33EBE7
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Aug 2013 18:12:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 7E5DEE468F
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Aug 2013 18:12:45 +0000 (UTC)
From: "Sven Vermeulen" <sven.vermeulen@siphos.be>
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" <sven.vermeulen@siphos.be>
Message-ID: <1376762955.527e263bcc63ffcfd21caaf9851c90c62ccb40ea.SwifT@gentoo>
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/admin/
X-VCS-Repository: proj/hardened-refpolicy
X-VCS-Files: policy/modules/admin/bootloader.fc
X-VCS-Directories: policy/modules/admin/
X-VCS-Committer: SwifT
X-VCS-Committer-Name: Sven Vermeulen
X-VCS-Revision: 527e263bcc63ffcfd21caaf9851c90c62ccb40ea
X-VCS-Branch: master
Date: Sat, 17 Aug 2013 18:12:45 +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: aee21314-ab9f-4125-9622-e22c339d3dd3
X-Archives-Hash: 817a928446f457b082ba41b53288d39d

commit:     527e263bcc63ffcfd21caaf9851c90c62ccb40ea
Author:     Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
AuthorDate: Sat Aug 17 18:09:15 2013 +0000
Commit:     Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
CommitDate: Sat Aug 17 18:09:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=527e263b

Get grub2-install to work properly

The grub2-install application runs a few grub2-* commands in the background. Two
of those, grub2-bios-setup and grub2-probe, need access to the (fixed) disks, a
permission not granted to users by default (unless running in unconfined of
course).

Mark those two applications as bootloader_exec_t (as was the case with the
"grub" legacy command in the past) so these get their appropriate permissions
again.

---
 policy/modules/admin/bootloader.fc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/policy/modules/admin/bootloader.fc b/policy/modules/admin/bootloader.fc
index 7a6f06f..4fe1641 100644
--- a/policy/modules/admin/bootloader.fc
+++ b/policy/modules/admin/bootloader.fc
@@ -7,3 +7,8 @@
 /sbin/ybin.*		--	gen_context(system_u:object_r:bootloader_exec_t,s0)
 
 /usr/sbin/grub		--	gen_context(system_u:object_r:bootloader_exec_t,s0)
+
+ifdef(`distro_gentoo',`
+/usr/sbin/grub2-bios-setup	--	gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/sbin/grub2-probe		--	gen_context(system_u:object_r:bootloader_exec_t,s0)
+')