1 |
commit: 185af393c476122508ba701df7bcbdcb0e4d4a68 |
2 |
Author: Nicolas Iooss <nicolas.iooss <AT> m4x <DOT> org> |
3 |
AuthorDate: Mon Jun 9 12:38:45 2014 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 25 18:59:11 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=185af393 |
7 |
|
8 |
Allow unconfined domains to use syslog capability |
9 |
|
10 |
When an unconfined_t root user runs dmesg, the kernel complains with |
11 |
this message in its logs (when SELinux is in enforcing mode): |
12 |
|
13 |
dmesg (16289): Attempt to access syslog with CAP_SYS_ADMIN but no |
14 |
CAP_SYSLOG (deprecated). |
15 |
|
16 |
audit.log contains following AVC: |
17 |
|
18 |
avc: denied { syslog } for pid=16289 comm="dmesg" capability=34 |
19 |
scontext=unconfined_u:unconfined_r:unconfined_t |
20 |
tcontext=unconfined_u:unconfined_r:unconfined_t tclass=capability2 |
21 |
|
22 |
--- |
23 |
policy/modules/system/unconfined.if | 1 + |
24 |
1 file changed, 1 insertion(+) |
25 |
|
26 |
diff --git a/policy/modules/system/unconfined.if b/policy/modules/system/unconfined.if |
27 |
index 5ca20a9..2b85a6e 100644 |
28 |
--- a/policy/modules/system/unconfined.if |
29 |
+++ b/policy/modules/system/unconfined.if |
30 |
@@ -20,6 +20,7 @@ interface(`unconfined_domain_noaudit',` |
31 |
|
32 |
# Use most Linux capabilities |
33 |
allow $1 self:capability ~sys_module; |
34 |
+ allow $1 self:capability2 syslog; |
35 |
allow $1 self:fifo_file manage_fifo_file_perms; |
36 |
|
37 |
# Transition to myself, to make get_ordered_context_list happy. |