Gentoo Archives: gentoo-commits

From: Sven Vermeulen <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/
Date: Mon, 25 Nov 2013 19:16:36
Message-Id: 1385406879.4da95bcbc783096eee848f78e13e673d33c4e785.swift@gentoo
1 commit: 4da95bcbc783096eee848f78e13e673d33c4e785
2 Author: Luis Ressel <aranea <AT> aixah <DOT> de>
3 AuthorDate: Sun Nov 17 12:53:07 2013 +0000
4 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 25 19:14:39 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=4da95bcb
7
8 Label /etc/cron.daily/logrotate correctly.
9
10 This is used at least on Gentoo, but I could imagine this also exists on
11 other distros.
12
13 ---
14 policy/modules/contrib/logrotate.fc | 1 +
15 policy/modules/contrib/logrotate.te | 2 +-
16 2 files changed, 2 insertions(+), 1 deletion(-)
17
18 diff --git a/policy/modules/contrib/logrotate.fc b/policy/modules/contrib/logrotate.fc
19 index a11d5be..207ec10 100644
20 --- a/policy/modules/contrib/logrotate.fc
21 +++ b/policy/modules/contrib/logrotate.fc
22 @@ -1,3 +1,4 @@
23 +/etc/cron\.(daily|weekly)/logrotate -- gen_context(system_u:object_r:logrotate_exec_t,s0)
24 /etc/cron\.(daily|weekly)/sysklogd -- gen_context(system_u:object_r:logrotate_exec_t,s0)
25
26 /usr/sbin/logrotate -- gen_context(system_u:object_r:logrotate_exec_t,s0)
27
28 diff --git a/policy/modules/contrib/logrotate.te b/policy/modules/contrib/logrotate.te
29 index be0ab84..8e871fe 100644
30 --- a/policy/modules/contrib/logrotate.te
31 +++ b/policy/modules/contrib/logrotate.te
32 @@ -57,7 +57,7 @@ manage_files_pattern(logrotate_t, logrotate_var_lib_t, logrotate_var_lib_t)
33 read_lnk_files_pattern(logrotate_t, logrotate_var_lib_t, logrotate_var_lib_t)
34 files_var_lib_filetrans(logrotate_t, logrotate_var_lib_t, file)
35
36 -can_exec(logrotate_t, logrotate_tmp_t)
37 +can_exec(logrotate_t, { logrotate_exec_t logrotate_tmp_t })
38
39 kernel_read_system_state(logrotate_t)
40 kernel_read_kernel_sysctls(logrotate_t)