1 |
commit: 2444e174c98a308ab6a27892f38028dbe4d0516b |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Sat Jun 7 17:45:56 2014 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 7 17:45:56 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=2444e174 |
7 |
|
8 |
Fix bug #512676 - Enable create/bind on SELinux netlink socket for run_init |
9 |
|
10 |
The run_init code calls avc_* functions, but the following failure |
11 |
occurs: |
12 |
|
13 |
~# run_init rc-service nfs status |
14 |
Authenticating swift. |
15 |
run_init: avc.c:74: avc_context_to_sid_raw: Assertion `avc_running' failed. |
16 |
Segmentation fault |
17 |
|
18 |
AVC denials are shown related to the netlink_selinux_socket class |
19 |
(create/bind privileges) and signal (possibly to handle failure). |
20 |
|
21 |
Allowing them has the run_init code run properly again. |
22 |
|
23 |
--- |
24 |
policy/modules/system/selinuxutil.te | 4 ++++ |
25 |
1 file changed, 4 insertions(+) |
26 |
|
27 |
diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te |
28 |
index 2b99c9b..b4d7bc3 100644 |
29 |
--- a/policy/modules/system/selinuxutil.te |
30 |
+++ b/policy/modules/system/selinuxutil.te |
31 |
@@ -650,6 +650,10 @@ ifdef(`distro_gentoo',` |
32 |
|
33 |
allow run_init_t self:passwd rootok; |
34 |
|
35 |
+ # Fix bug #512676 |
36 |
+ allow run_init_t self:process signal; |
37 |
+ allow run_init_t self:selinux_netlink_socket { create bind }; |
38 |
+ |
39 |
# Denials upon loading policy |
40 |
fs_getattr_tmpfs(setfiles_t) |
41 |
dev_getattr_fs(setfiles_t) |