From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1071314-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 AFF07138334
	for <garchives@archives.gentoo.org>; Sun, 10 Feb 2019 04:14:49 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A21BAE0ABD;
	Sun, 10 Feb 2019 04:14:48 +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 7DDDFE0AB0
	for <gentoo-commits@lists.gentoo.org>; Sun, 10 Feb 2019 04:14:48 +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 B943A335D2A
	for <gentoo-commits@lists.gentoo.org>; Sun, 10 Feb 2019 04:14:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 046E153E
	for <gentoo-commits@lists.gentoo.org>; Sun, 10 Feb 2019 04:14:45 +0000 (UTC)
From: "Jason Zaman" <perfinion@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, "Jason Zaman" <perfinion@gentoo.org>
Message-ID: <1549771885.f2e3f0187d67264d9511dbbdbc3b40d898ac9eed.perfinion@gentoo>
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/
X-VCS-Repository: proj/hardened-refpolicy
X-VCS-Files: policy/modules/kernel/kernel.if
X-VCS-Directories: policy/modules/kernel/
X-VCS-Committer: perfinion
X-VCS-Committer-Name: Jason Zaman
X-VCS-Revision: f2e3f0187d67264d9511dbbdbc3b40d898ac9eed
X-VCS-Branch: master
Date: Sun, 10 Feb 2019 04:14: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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 74860b5d-14fd-4654-aefa-ad30eac0e212
X-Archives-Hash: c2ec997e3895cc76af211054e994143a

commit:     f2e3f0187d67264d9511dbbdbc3b40d898ac9eed
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sat Jan 12 08:03:42 2019 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Feb 10 04:11:25 2019 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=f2e3f018

kernel: introduce kernel_dontaudit_read_kernel_sysctl

Signed-off-by: Jason Zaman <jason <AT> perfinion.com>

 policy/modules/kernel/kernel.if | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/policy/modules/kernel/kernel.if b/policy/modules/kernel/kernel.if
index 5afc4802..de5ee946 100644
--- a/policy/modules/kernel/kernel.if
+++ b/policy/modules/kernel/kernel.if
@@ -2012,6 +2012,24 @@ interface(`kernel_dontaudit_search_kernel_sysctl',`
 	dontaudit $1 sysctl_kernel_t:dir search;
 ')
 
+#######################################
+## <summary>
+##	Do not audit attempted reading of kernel sysctls
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to not audit accesses from
+##	</summary>
+## </param>
+#
+interface(`kernel_dontaudit_read_kernel_sysctl',`
+	gen_require(`
+		type sysctl_kernel_t;
+	')
+
+	dontaudit $1 sysctl_kernel_t:file read_file_perms;
+')
+
 ########################################
 ## <summary>
 ##	Read generic crypto sysctls.