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 D8F30138ACF for ; Fri, 2 Jan 2015 17:22:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69E29E0784; Fri, 2 Jan 2015 17:22:34 +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 A22DEE0784 for ; Fri, 2 Jan 2015 17:22:33 +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 89DC83406E8 for ; Fri, 2 Jan 2015 17:22:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 37ADBEBAE for ; Fri, 2 Jan 2015 17:22:31 +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: <1420219089.acbf0504f0645f997f16b3e70164f3c6acc2be86.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/courier.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: acbf0504f0645f997f16b3e70164f3c6acc2be86 X-VCS-Branch: master Date: Fri, 2 Jan 2015 17:22:31 +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: 4d612141-d489-4464-8027-132a190b1fd0 X-Archives-Hash: d1d620a94824b21afb84bcef49963baa commit: acbf0504f0645f997f16b3e70164f3c6acc2be86 Author: Sven Vermeulen siphos be> AuthorDate: Wed Dec 31 16:09:56 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Fri Jan 2 17:18:09 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=acbf0504 Grant setuid/setgid to courier_pop_t When trying to log on to the IMAP service, the authentication fails and the following shows up in the courier logs: Dec 30 19:40:56 localhost imapd: Connection, ip=[::ffff:192.168.100.152] Dec 30 19:40:56 localhost imapd: initgroups: Operation not permitted In the audit logs, the following shows up: type=AVC msg=audit(1419968456.850:190): avc: denied { setgid } for pid=4028 comm="imaplogin" capability=6 scontext=system_u:system_r:courier_pop_t:s0 tcontext=system_u:system_r:courier_pop_t:s0 tclass=capability type=AVC msg=audit(1419968532.622:192): avc: denied { setuid } for pid=4118 comm="imaplogin" capability=7 scontext=system_u:system_r:courier_pop_t:s0 tcontext=system_u:system_r:courier_pop_t:s0 tclass=capability The daemon wants to switch user to access the necessary maildir's. Signed-off-by: Sven Vermeulen siphos.be> --- policy/modules/contrib/courier.te | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/modules/contrib/courier.te b/policy/modules/contrib/courier.te index bcfb4b2..29057a7 100644 --- a/policy/modules/contrib/courier.te +++ b/policy/modules/contrib/courier.te @@ -132,6 +132,7 @@ dev_read_rand(courier_pcp_t) # POP3/IMAP local policy # +allow courier_pop_t self:capability { setgid setuid }; allow courier_pop_t courier_authdaemon_t:tcp_socket rw_stream_socket_perms; allow courier_pop_t courier_authdaemon_t:process sigchld;