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 689FD1381F3 for ; Sat, 10 Aug 2013 16:40:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB5E1E09C4; Sat, 10 Aug 2013 16:40:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8B7F3E09C4 for ; Sat, 10 Aug 2013 16:39:55 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5AC3B33EB7D for ; Sat, 10 Aug 2013 16:39:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CF4FFE468F for ; Sat, 10 Aug 2013 16:39:52 +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: <1376152640.a8391e8daab80ff772a3a8896d66394c73e884f4.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/selinuxutil.fc X-VCS-Directories: policy/modules/system/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: a8391e8daab80ff772a3a8896d66394c73e884f4 X-VCS-Branch: master Date: Sat, 10 Aug 2013 16:39:52 +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: 4ab87a9c-140f-47a0-8257-76fa50c7254e X-Archives-Hash: ade55d8572bb3e5c04a8909f2ccf4810 commit: a8391e8daab80ff772a3a8896d66394c73e884f4 Author: Sven Vermeulen siphos be> AuthorDate: Sat Aug 10 16:37:20 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Sat Aug 10 16:37:20 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=a8391e8d Enable python-exec support In Gentoo, /usr/sbin/semanage is a symlink to /usr/bin/python-exec which will then decide which Python version to execute. As semanage is only labeled as semanage_exec_t if it is a regular file, it now remains bin_t. We have two choices here - either relabel /usr/sbin/semanage itself, or the semanage-python* files. We pick the second, because we don't know what rights/permissions python-exec needs, but it shouldn't be semanage_t. --- policy/modules/system/selinuxutil.fc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policy/modules/system/selinuxutil.fc b/policy/modules/system/selinuxutil.fc index 3f6690c..335583d 100644 --- a/policy/modules/system/selinuxutil.fc +++ b/policy/modules/system/selinuxutil.fc @@ -52,3 +52,8 @@ # /var/run # /var/run/restorecond\.pid -- gen_context(system_u:object_r:restorecond_var_run_t,s0) + +ifdef(`distro_gentoo',` +# Support for gentoo python switcheridoo +/usr/sbin/semanage-python.* -- gen_context(system_u:object_r:semanage_exec_t,s0) +')