From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9D335138D03 for ; Sat, 11 Jul 2015 19:57:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08692E08DC; Sat, 11 Jul 2015 19:57:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 59726E08D5 for ; Sat, 11 Jul 2015 19:57:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6481A34089A for ; Sat, 11 Jul 2015 19:57:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 39BE4760 for ; Sat, 11 Jul 2015 19:57:18 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1436644594.f03e69fce25a75b8c41d3ca79ea48e7792cd9589.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/sysstat.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: f03e69fce25a75b8c41d3ca79ea48e7792cd9589 X-VCS-Branch: next Date: Sat, 11 Jul 2015 19:57:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c805debe-f722-459f-8c1a-199c610690fc X-Archives-Hash: d89bb5e47fdeb29971410a0d19f531ab commit: f03e69fce25a75b8c41d3ca79ea48e7792cd9589 Author: Jason Zaman perfinion com> AuthorDate: Sat Jul 11 18:41:39 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Jul 11 19:56:34 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=f03e69fc sysstat: exec shell and read logs The cron entry runs a shell script and needs to be able to read its logs type=AVC msg=audit(1436639401.545:833311): avc: denied { read } for pid=10340 comm="sa1" path="/bin/bash" dev="md3" ino=14263160 scontext=system_u:system_r:sysstat_t tcontext=system_u:object_r:shell_exec_t tclass=file type=SYSCALL msg=audit(1436639401.545:833311): arch=c000003e syscall=10 success=yes exit=0 a0=d9545b6e000 a1=3000 a2=1 a3=76a19c4ec148 items=0 ppid=10330 pid=10340 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1211 comm="sa1" exe="/bin/bash" subj=system_u:system_r:sysstat_t key=(null) type=AVC msg=audit(1436639401.549:833312): avc: denied { read } for pid=10340 comm="sadc" name="sa12" dev="md3" ino=9183233 scontext=system_u:system_r:sysstat_t tcontext=system_u:object_r:sysstat_log_t tclass=file policy/modules/contrib/sysstat.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policy/modules/contrib/sysstat.te b/policy/modules/contrib/sysstat.te index fd167ee..65da9ae 100644 --- a/policy/modules/contrib/sysstat.te +++ b/policy/modules/contrib/sysstat.te @@ -67,3 +67,8 @@ userdom_dontaudit_list_user_home_dirs(sysstat_t) optional_policy(` cron_system_entry(sysstat_t, sysstat_exec_t) ') + +ifdef(`distro_gentoo',` + corecmd_exec_shell(sysstat_t) + read_files_pattern(sysstat_t, sysstat_log_t, sysstat_log_t) +')