selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Zaman <jason@perfinion.com>
To: selinux-refpolicy@vger.kernel.org
Cc: Jason Zaman <jason@perfinion.com>
Subject: [PATCH 1/5] devices: introduce dev_dontaudit_read_sysfs
Date: Sat, 12 Jan 2019 16:03:40 +0800	[thread overview]
Message-ID: <20190112080344.10031-1-jason@perfinion.com> (raw)

Signed-off-by: Jason Zaman <jason@perfinion.com>
---
 policy/modules/kernel/devices.if | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/policy/modules/kernel/devices.if b/policy/modules/kernel/devices.if
index 65bfcb63..78a95ce8 100644
--- a/policy/modules/kernel/devices.if
+++ b/policy/modules/kernel/devices.if
@@ -4043,6 +4043,26 @@ interface(`dev_dontaudit_getattr_sysfs',`
 	dontaudit $1 sysfs_t:filesystem getattr;
 ')
 
+########################################
+## <summary>
+##	Dont audit attempts to read hardware state information
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain for which the attempts do not need to be audited
+##	</summary>
+## </param>
+#
+interface(`dev_dontaudit_read_sysfs',`
+	gen_require(`
+		type sysfs_t;
+	')
+
+	dontaudit $1 sysfs_t:file read_file_perms;
+	dontaudit $1 sysfs_t:dir list_dir_perms;
+	dontaudit $1 sysfs_t:lnk_file read_lnk_file_perms;
+')
+
 ########################################
 ## <summary>
 ##     mounton sysfs directories.
-- 
2.19.2


             reply	other threads:[~2019-01-12  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12  8:03 Jason Zaman [this message]
2019-01-12  8:03 ` [PATCH 2/5] files: introduce files_dontaudit_read_etc_files Jason Zaman
2019-01-12  8:03 ` [PATCH 3/5] kernel: introduce kernel_dontaudit_read_kernel_sysctl Jason Zaman
2019-01-12  8:03 ` [PATCH 4/5] userdomain: introduce userdom_user_home_dir_filetrans_user_cert Jason Zaman
2019-01-12  8:03 ` [PATCH 5/5] Add chromium policy upstreamed from Gentoo Jason Zaman
2019-01-23  8:27   ` Russell Coker
2019-01-23 23:49   ` Chris PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190112080344.10031-1-jason@perfinion.com \
    --to=jason@perfinion.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).