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 AC4F7138CD3 for ; Tue, 9 Jun 2015 13:59:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E8B0E0819; Tue, 9 Jun 2015 13:59:09 +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 EE3AEE0819 for ; Tue, 9 Jun 2015 13:59:08 +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 4F9BE3409AA for ; Tue, 9 Jun 2015 13:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 09551A09 for ; Tue, 9 Jun 2015 13:59:07 +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: <1433856870.282c67cd689d85ddd0f9f0496a2411b67bb50527.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master 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: 282c67cd689d85ddd0f9f0496a2411b67bb50527 X-VCS-Branch: master Date: Tue, 9 Jun 2015 13:59:07 +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: 2f7a259d-6361-4128-9b27-9a225db23950 X-Archives-Hash: 0903095054facacad25f0822b4fd1212 commit: 282c67cd689d85ddd0f9f0496a2411b67bb50527 Author: Sven Vermeulen siphos be> AuthorDate: Tue Jun 9 13:26:55 2015 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Tue Jun 9 13:34:30 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=282c67cd 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) ') 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 473F2138CD3 for ; Tue, 9 Jun 2015 13:35:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94105E0887; Tue, 9 Jun 2015 13:34:58 +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 4188FE088F for ; Tue, 9 Jun 2015 13:34:58 +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 93C41340AF9 for ; Tue, 9 Jun 2015 13:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D9E02A36 for ; Tue, 9 Jun 2015 13:34:54 +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: <1433856870.282c67cd689d85ddd0f9f0496a2411b67bb50527.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: 282c67cd689d85ddd0f9f0496a2411b67bb50527 X-VCS-Branch: swift Date: Tue, 9 Jun 2015 13:34:54 +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: 531e01d1-bddf-49ac-8a37-6f5908a4f829 X-Archives-Hash: 2eadc5af43fb9d5c44de9b936ac0136c Message-ID: <20150609133454.U2q4OqzAm3YosBb-VyFCngyB_DrUnm5pBTrWCzTDZF8@z> commit: 282c67cd689d85ddd0f9f0496a2411b67bb50527 Author: Sven Vermeulen siphos be> AuthorDate: Tue Jun 9 13:26:55 2015 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Tue Jun 9 13:34:30 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=282c67cd 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) ')