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 4F44F138D18 for ; Mon, 13 Jul 2015 21:45:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E30F3E0922; Mon, 13 Jul 2015 21:45:55 +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 2770BE0925 for ; Mon, 13 Jul 2015 21:45:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 566CC340A26 for ; Mon, 13 Jul 2015 21:45:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C66D0999 for ; Mon, 13 Jul 2015 21:45:51 +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: <1436823814.430ece6c0478072338d29aaff7f9d842c77b35b6.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: 430ece6c0478072338d29aaff7f9d842c77b35b6 X-VCS-Branch: next Date: Mon, 13 Jul 2015 21:45:51 +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: 0ef00f4a-ec0c-497a-aa81-11c20ca1611f X-Archives-Hash: edf50af1b7fd581d8280a8c1974dc97d Message-ID: <20150713214551.6HCSFWZH8koVwwUJW2SunZ7cz_en1FylPSGxrGIfPME@z> commit: 430ece6c0478072338d29aaff7f9d842c77b35b6 Author: Jason Zaman perfinion com> AuthorDate: Sat Jul 11 18:41:39 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Jul 13 21:43:34 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=430ece6c sysstat: exec shell and read logs The cron entry runs a shell script and needs to be able to manage 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=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 type=AVC msg=audit(1436716381.830:836456): avc: denied { write } for pid=31504 comm="sa2" path="/var/log/sa/sar12" dev="md3" ino=9183238 scontext=system_u:system_r:sysstat_t tcontext=system_u:object_r:sysstat_log_t tclass=file type=AVC msg=audit(1436716381.909:836457): avc: denied { unlink } for pid=31506 comm="rm" name="sar20" dev="md3" ino=9183237 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..c4af8d9 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) + manage_files_pattern(sysstat_t, sysstat_log_t, sysstat_log_t) +')