1 |
commit: 4958ff939e10105864acd95b941c9d7e3d380586 |
2 |
Author: Chris PeBenito <pebenito <AT> ieee <DOT> org> |
3 |
AuthorDate: Wed Apr 26 10:25:59 2017 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 30 09:21:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4958ff93 |
7 |
|
8 |
login take 4 from Russell Coker. |
9 |
|
10 |
I have used optional sections for dbus and xserver as requested and also |
11 |
fixed a minor issue of a rule not being in the correct section. |
12 |
|
13 |
Please merge this. |
14 |
|
15 |
policy/modules/contrib/dbus.te | 6 ++++++ |
16 |
policy/modules/contrib/gpg.te | 12 ++++++++++++ |
17 |
policy/modules/contrib/policykit.te | 5 +++++ |
18 |
3 files changed, 23 insertions(+) |
19 |
|
20 |
diff --git a/policy/modules/contrib/dbus.te b/policy/modules/contrib/dbus.te |
21 |
index 579b2230..80ceb9de 100644 |
22 |
--- a/policy/modules/contrib/dbus.te |
23 |
+++ b/policy/modules/contrib/dbus.te |
24 |
@@ -149,6 +149,12 @@ ifdef(`distro_gentoo',` |
25 |
') |
26 |
') |
27 |
|
28 |
+ifdef(`init_systemd', ` |
29 |
+ # gdm3 causes system_dbusd_t to want this access |
30 |
+ dev_rw_dri(system_dbusd_t) |
31 |
+ dev_rw_input_dev(system_dbusd_t) |
32 |
+') |
33 |
+ |
34 |
optional_policy(` |
35 |
# for /run/systemd/users/* |
36 |
systemd_read_logind_pids(system_dbusd_t) |
37 |
|
38 |
diff --git a/policy/modules/contrib/gpg.te b/policy/modules/contrib/gpg.te |
39 |
index 4345bd08..c795f278 100644 |
40 |
--- a/policy/modules/contrib/gpg.te |
41 |
+++ b/policy/modules/contrib/gpg.te |
42 |
@@ -87,6 +87,7 @@ gpg_stream_connect_agent(gpg_t) |
43 |
domtrans_pattern(gpg_t, gpg_agent_exec_t, gpg_agent_t) |
44 |
domtrans_pattern(gpg_t, gpg_helper_exec_t, gpg_helper_t) |
45 |
|
46 |
+kernel_read_crypto_sysctls(gpg_t) |
47 |
kernel_read_sysctl(gpg_t) |
48 |
# read /proc/cpuinfo |
49 |
kernel_read_system_state(gpg_t) |
50 |
@@ -232,6 +233,8 @@ kernel_dontaudit_search_sysctl(gpg_agent_t) |
51 |
kernel_read_core_if(gpg_agent_t) |
52 |
kernel_read_system_state(gpg_agent_t) |
53 |
|
54 |
+auth_use_nsswitch(gpg_agent_t) |
55 |
+ |
56 |
corecmd_exec_bin(gpg_agent_t) |
57 |
corecmd_exec_shell(gpg_agent_t) |
58 |
|
59 |
@@ -272,6 +275,10 @@ tunable_policy(`use_samba_home_dirs',` |
60 |
') |
61 |
|
62 |
optional_policy(` |
63 |
+ dbus_system_bus_client(gpg_agent_t) |
64 |
+') |
65 |
+ |
66 |
+optional_policy(` |
67 |
mozilla_dontaudit_rw_user_home_files(gpg_agent_t) |
68 |
') |
69 |
|
70 |
@@ -279,6 +286,11 @@ optional_policy(` |
71 |
pcscd_stream_connect(gpg_agent_t) |
72 |
') |
73 |
|
74 |
+optional_policy(` |
75 |
+ xserver_sigchld_xdm(gpg_agent_t) |
76 |
+ xserver_read_user_xauth(gpg_agent_t) |
77 |
+') |
78 |
+ |
79 |
############################## |
80 |
# |
81 |
# Pinentry local policy |
82 |
|
83 |
diff --git a/policy/modules/contrib/policykit.te b/policy/modules/contrib/policykit.te |
84 |
index d7686081..ee6ad3da 100644 |
85 |
--- a/policy/modules/contrib/policykit.te |
86 |
+++ b/policy/modules/contrib/policykit.te |
87 |
@@ -89,6 +89,7 @@ kernel_read_kernel_sysctls(policykit_t) |
88 |
kernel_read_system_state(policykit_t) |
89 |
|
90 |
dev_read_urand(policykit_t) |
91 |
+dev_read_urand(policykit_t) |
92 |
|
93 |
domain_read_all_domains_state(policykit_t) |
94 |
|
95 |
@@ -96,6 +97,8 @@ files_dontaudit_search_all_mountpoints(policykit_t) |
96 |
|
97 |
fs_getattr_xattr_fs(policykit_t) |
98 |
fs_list_inotifyfs(policykit_t) |
99 |
+fs_getattr_tmpfs(policykit_t) |
100 |
+fs_getattr_cgroup(policykit_t) |
101 |
|
102 |
auth_use_nsswitch(policykit_t) |
103 |
|
104 |
@@ -105,6 +108,8 @@ userdom_read_all_users_state(policykit_t) |
105 |
optional_policy(` |
106 |
dbus_system_domain(policykit_t, policykit_exec_t) |
107 |
|
108 |
+ userdom_dbus_send_all_users(policykit_t) |
109 |
+ |
110 |
optional_policy(` |
111 |
consolekit_dbus_chat(policykit_t) |
112 |
') |