commit:     63ab6a3846fefa9040bd9a3b21bdfa8c84b5dc31
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sat Jan 12 08:03:40 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=63ab6a38

devices: introduce dev_dontaudit_read_sysfs

Signed-off-by: Jason Zaman <jason <AT> 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 0966a468..84b9d8fb 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.

Reply via email to