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 4A5B3138CDD for ; Tue, 9 Jun 2015 13:30:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6903E0863; Tue, 9 Jun 2015 13:30:29 +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 6B840E0863 for ; Tue, 9 Jun 2015 13:30:29 +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 857213407D7 for ; Tue, 9 Jun 2015 13:30:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B71CA09 for ; Tue, 9 Jun 2015 13:30:26 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1433856415.dc2ab995ed353dbd547b1522a60330abe448aff4.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:swift commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/fail2ban.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: dc2ab995ed353dbd547b1522a60330abe448aff4 X-VCS-Branch: swift Date: Tue, 9 Jun 2015 13:30:26 +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: c371dcee-fd32-46df-9b3b-120f89fca9d8 X-Archives-Hash: 9baeee6ac9c2b529fb32f297cb47cecf commit: dc2ab995ed353dbd547b1522a60330abe448aff4 Author: Sven Vermeulen siphos be> AuthorDate: Tue Jun 9 13:26:55 2015 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Tue Jun 9 13:26:55 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=dc2ab995 Fail2ban smoketest fixes This partially fixes some of the reported issues in bug #534256. More specifically, fail2ban fails to start because - fail2ban-client is invoked from the service and checks if it has write privileges on /run/fail2ban (although it does not by itself use it further). - fail2ban init script creates /run/fail2ban so a file transition is needed - output should be captured when an init script is used, hence allow fail2ban_client_t access to the initrc script ptys. X-Gentoo-Bug: 534256 policy/modules/contrib/fail2ban.te | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/policy/modules/contrib/fail2ban.te b/policy/modules/contrib/fail2ban.te index 6b9fb7e..bc6bd8e 100644 --- a/policy/modules/contrib/fail2ban.te +++ b/policy/modules/contrib/fail2ban.te @@ -159,6 +159,12 @@ ifdef(`distro_gentoo',` # Python compilation files_dontaudit_write_usr_dirs(fail2ban_t) + + # Fix bug 534256 - Startup fails without these + allow fail2ban_client_t fail2ban_var_run_t:dir write; + + init_daemon_pid_file(fail2ban_var_run_t, dir, "fail2ban") + init_use_script_ptys(fail2ban_client_t) ')