commit: 4958ff939e10105864acd95b941c9d7e3d380586
Author: Chris PeBenito <pebenito <AT> ieee <DOT> org>
AuthorDate: Wed Apr 26 10:25:59 2017 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Apr 30 09:21:11 2017 +0000
URL:
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4958ff93
login take 4 from Russell Coker.
I have used optional sections for dbus and xserver as requested and also
fixed a minor issue of a rule not being in the correct section.
Please merge this.
policy/modules/contrib/dbus.te | 6 ++++++
policy/modules/contrib/gpg.te | 12 ++++++++++++
policy/modules/contrib/policykit.te | 5 +++++
3 files changed, 23 insertions(+)
diff --git a/policy/modules/contrib/dbus.te b/policy/modules/contrib/dbus.te
index 579b2230..80ceb9de 100644
--- a/policy/modules/contrib/dbus.te
+++ b/policy/modules/contrib/dbus.te
@@ -149,6 +149,12 @@ ifdef(`distro_gentoo',`
')
')
+ifdef(`init_systemd', `
+ # gdm3 causes system_dbusd_t to want this access
+ dev_rw_dri(system_dbusd_t)
+ dev_rw_input_dev(system_dbusd_t)
+')
+
optional_policy(`
# for /run/systemd/users/*
systemd_read_logind_pids(system_dbusd_t)
diff --git a/policy/modules/contrib/gpg.te b/policy/modules/contrib/gpg.te
index 4345bd08..c795f278 100644
--- a/policy/modules/contrib/gpg.te
+++ b/policy/modules/contrib/gpg.te
@@ -87,6 +87,7 @@ gpg_stream_connect_agent(gpg_t)
domtrans_pattern(gpg_t, gpg_agent_exec_t, gpg_agent_t)
domtrans_pattern(gpg_t, gpg_helper_exec_t, gpg_helper_t)
+kernel_read_crypto_sysctls(gpg_t)
kernel_read_sysctl(gpg_t)
# read /proc/cpuinfo
kernel_read_system_state(gpg_t)
@@ -232,6 +233,8 @@ kernel_dontaudit_search_sysctl(gpg_agent_t)
kernel_read_core_if(gpg_agent_t)
kernel_read_system_state(gpg_agent_t)
+auth_use_nsswitch(gpg_agent_t)
+
corecmd_exec_bin(gpg_agent_t)
corecmd_exec_shell(gpg_agent_t)
@@ -272,6 +275,10 @@ tunable_policy(`use_samba_home_dirs',`
')
optional_policy(`
+ dbus_system_bus_client(gpg_agent_t)
+')
+
+optional_policy(`
mozilla_dontaudit_rw_user_home_files(gpg_agent_t)
')
@@ -279,6 +286,11 @@ optional_policy(`
pcscd_stream_connect(gpg_agent_t)
')
+optional_policy(`
+ xserver_sigchld_xdm(gpg_agent_t)
+ xserver_read_user_xauth(gpg_agent_t)
+')
+
##############################
#
# Pinentry local policy
diff --git a/policy/modules/contrib/policykit.te
b/policy/modules/contrib/policykit.te
index d7686081..ee6ad3da 100644
--- a/policy/modules/contrib/policykit.te
+++ b/policy/modules/contrib/policykit.te
@@ -89,6 +89,7 @@ kernel_read_kernel_sysctls(policykit_t)
kernel_read_system_state(policykit_t)
dev_read_urand(policykit_t)
+dev_read_urand(policykit_t)
domain_read_all_domains_state(policykit_t)
@@ -96,6 +97,8 @@ files_dontaudit_search_all_mountpoints(policykit_t)
fs_getattr_xattr_fs(policykit_t)
fs_list_inotifyfs(policykit_t)
+fs_getattr_tmpfs(policykit_t)
+fs_getattr_cgroup(policykit_t)
auth_use_nsswitch(policykit_t)
@@ -105,6 +108,8 @@ userdom_read_all_users_state(policykit_t)
optional_policy(`
dbus_system_domain(policykit_t, policykit_exec_t)
+ userdom_dbus_send_all_users(policykit_t)
+
optional_policy(`
consolekit_dbus_chat(policykit_t)
')