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 F412C13877A for ; Sun, 6 Jul 2014 09:49:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9694E07A5; Sun, 6 Jul 2014 09:49:47 +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 6FC0BE07A5 for ; Sun, 6 Jul 2014 09:49:47 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6617933F6C7 for ; Sun, 6 Jul 2014 09:49:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id A54E618011 for ; Sun, 6 Jul 2014 09:49:44 +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: <1404640099.e272f69ec718dcd0f6e0df8ade02e722df918440.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/chromium.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: e272f69ec718dcd0f6e0df8ade02e722df918440 X-VCS-Branch: master Date: Sun, 6 Jul 2014 09:49:44 +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: d8452191-46a8-4cfa-a851-46fd849f2d98 X-Archives-Hash: c2ed5f12112998cf8be613d461a7c5f3 commit: e272f69ec718dcd0f6e0df8ade02e722df918440 Author: Jason Zaman perfinion com> AuthorDate: Sat Jul 5 16:19:08 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Sun Jul 6 09:48:19 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=e272f69e Create chromium_bind_tcp_unreserved_ports boolean Some extensions for chromium need to be able to listen on tcp ports. This adds a boolean (default off) to allow binding to unreserved tcp ports. Signed-off-by: Jason Zaman perfinion.com> --- policy/modules/contrib/chromium.te | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/policy/modules/contrib/chromium.te b/policy/modules/contrib/chromium.te index b460904..878d8c9 100644 --- a/policy/modules/contrib/chromium.te +++ b/policy/modules/contrib/chromium.te @@ -30,6 +30,17 @@ gen_tunable(chromium_use_java, false) ## gen_tunable(chromium_read_system_info, false) +## +##

+## Allow chromium to bind to tcp ports +##

+##

+## Although not needed for regular browsing, some chrome extensions need to +## bind to tcp ports and accept connections. +##

+##
+gen_tunable(chromium_bind_tcp_unreserved_ports, false) + type chromium_t; domain_dyntrans_type(chromium_t) @@ -163,6 +174,12 @@ xdg_read_data_home_files(chromium_t) xserver_user_x_domain_template(chromium, chromium_t, chromium_tmpfs_t) +tunable_policy(`chromium_bind_tcp_unreserved_ports',` + corenet_tcp_bind_generic_node(chromium_t) + corenet_tcp_bind_all_unreserved_ports(chromium_t) + allow chromium_t self:tcp_socket { listen accept }; +') + tunable_policy(`chromium_read_system_info',` kernel_read_kernel_sysctls(chromium_t) # Memory optimizations & optimizations based on OS/version