From: "Sugar, David" <dsugar@tresys.com>
To: "selinux-refpolicy@vger.kernel.org" <selinux-refpolicy@vger.kernel.org>
Subject: [PATCH v2] New interface to dontaudit access to cert_t
Date: Wed, 20 Feb 2019 16:37:46 +0000 [thread overview]
Message-ID: <20190220163709.27002-2-dsugar@tresys.com> (raw)
In-Reply-To: <20190220163709.27002-1-dsugar@tresys.com>
I'm seeing a bunch of denials for various processes (some refpolicy
domains, some my own application domains) attempting to access
/etc/pki. They seem to be working OK even with the denial. The
tunable authlogin_nsswitch_use_ldap controls access to cert_t
(for domains that are part of nsswitch_domain attribute). Use this
new interface when that tunable is off to quiet the denials.
Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
policy/modules/system/authlogin.te | 2 ++
policy/modules/system/miscfiles.if | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/policy/modules/system/authlogin.te b/policy/modules/system/authlogin.te
index 345e07f3..a98054c5 100644
--- a/policy/modules/system/authlogin.te
+++ b/policy/modules/system/authlogin.te
@@ -431,6 +431,8 @@ sysnet_dns_name_resolve(nsswitch_domain)
tunable_policy(`authlogin_nsswitch_use_ldap',`
miscfiles_read_generic_certs(nsswitch_domain)
sysnet_use_ldap(nsswitch_domain)
+',`
+ miscfiles_dontaudit_read_generic_certs(nsswitch_domain)
')
optional_policy(`
diff --git a/policy/modules/system/miscfiles.if b/policy/modules/system/miscfiles.if
index 93c1f9c1..df11794a 100644
--- a/policy/modules/system/miscfiles.if
+++ b/policy/modules/system/miscfiles.if
@@ -131,6 +131,27 @@ interface(`miscfiles_read_generic_certs',`
read_lnk_files_pattern($1, cert_t, cert_t)
')
+########################################
+## <summary>
+## Do not audit attempts to read generic SSL/TLS certificates.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`miscfiles_dontaudit_read_generic_certs',`
+ gen_require(`
+ type cert_t;
+ ')
+
+ dontaudit $1 cert_t:dir list_dir_perms;
+ dontaudit $1 cert_t:file read_file_perms;
+ dontaudit $1 cert_t:lnk_file read_lnk_file_perms;
+')
+
########################################
## <summary>
## Manage generic SSL/TLS certificates.
--
2.20.1
next prev parent reply other threads:[~2019-02-20 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 16:37 [PATCH v2] Add interface to get status of rsyslog service Sugar, David
2019-02-20 16:37 ` Sugar, David [this message]
2019-02-21 3:40 ` [PATCH v2] New interface to dontaudit access to cert_t Chris PeBenito
2019-02-21 3:40 ` [PATCH v2] Add interface to get status of rsyslog service 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=20190220163709.27002-2-dsugar@tresys.com \
--to=dsugar@tresys.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).