From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-981374-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF1541396DA for <garchives@archives.gentoo.org>; Mon, 30 Oct 2017 15:07:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EEEBBE1003; Mon, 30 Oct 2017 15:07:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C10DAE1003 for <gentoo-commits@lists.gentoo.org>; Mon, 30 Oct 2017 15:07:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6BAD13416EF for <gentoo-commits@lists.gentoo.org>; Mon, 30 Oct 2017 15:07:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CF3F2909A for <gentoo-commits@lists.gentoo.org>; Mon, 30 Oct 2017 15:07:44 +0000 (UTC) From: "Jason Zaman" <perfinion@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" <perfinion@gentoo.org> Message-ID: <1509356266.53699de58543c87fc116e7ed9fcd3e89555cb890.perfinion@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/rtorrent.fc policy/modules/contrib/rtorrent.if policy/modules/contrib/rtorrent.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 53699de58543c87fc116e7ed9fcd3e89555cb890 X-VCS-Branch: master Date: Mon, 30 Oct 2017 15:07:44 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a337c7a9-c91b-4474-8fed-cb401de66143 X-Archives-Hash: 53a7cfd26e9ab43ae041d1f935197cdb commit: 53699de58543c87fc116e7ed9fcd3e89555cb890 Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Mon Oct 30 07:46:01 2017 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Mon Oct 30 09:37:46 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=53699de5 rtorrent: session dir fixes and allow exec for post download hooks policy/modules/contrib/rtorrent.fc | 1 + policy/modules/contrib/rtorrent.if | 4 ++-- policy/modules/contrib/rtorrent.te | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/policy/modules/contrib/rtorrent.fc b/policy/modules/contrib/rtorrent.fc index fb391dfc..65a77bf0 100644 --- a/policy/modules/contrib/rtorrent.fc +++ b/policy/modules/contrib/rtorrent.fc @@ -1,4 +1,5 @@ HOME_DIR/.rtorrent.rc -- gen_context(system_u:object_r:rtorrent_home_t,s0) HOME_DIR/.rtsession(/.*)? gen_context(system_u:object_r:rtorrent_session_t,s0) +HOME_DIR/.rtorrent(/.*)? gen_context(system_u:object_r:rtorrent_session_t,s0) /usr/bin/rtorrent -- gen_context(system_u:object_r:rtorrent_exec_t,s0) diff --git a/policy/modules/contrib/rtorrent.if b/policy/modules/contrib/rtorrent.if index 790f8893..8818b654 100644 --- a/policy/modules/contrib/rtorrent.if +++ b/policy/modules/contrib/rtorrent.if @@ -28,8 +28,8 @@ interface(`rtorrent_role',` manage_files_pattern($2, rtorrent_home_t, rtorrent_home_t) - read_files_pattern($2, rtorrent_session_t, rtorrent_session_t) - list_dirs_pattern($2, rtorrent_session_t, rtorrent_session_t) + manage_files_pattern($2, rtorrent_session_t, rtorrent_session_t) + manage_dirs_pattern($2, rtorrent_session_t, rtorrent_session_t) ps_process_pattern($2, rtorrent_t) ') diff --git a/policy/modules/contrib/rtorrent.te b/policy/modules/contrib/rtorrent.te index bf12b0c0..e7f7c354 100644 --- a/policy/modules/contrib/rtorrent.te +++ b/policy/modules/contrib/rtorrent.te @@ -54,10 +54,15 @@ corenet_tcp_sendrecv_all_ports(rtorrent_t) domain_use_interactive_fds(rtorrent_t) files_list_home(rtorrent_t) +files_list_tmp(rtorrent_t) +files_list_var(rtorrent_t) files_read_etc_files(rtorrent_t) fs_getattr_xattr_fs(rtorrent_t) +kernel_read_system_state(rtorrent_t) + +miscfiles_read_generic_certs(rtorrent_t) miscfiles_read_localization(rtorrent_t) sysnet_read_config(rtorrent_t) @@ -75,7 +80,8 @@ tunable_policy(`rtorrent_use_dht',` tunable_policy(`rtorrent_use_rsync',` allow rtorrent_t self:unix_stream_socket { create connect write read }; - corecmd_search_bin(rtorrent_t) + corecmd_exec_bin(rtorrent_t) + corecmd_exec_shell(rtorrent_t) corenet_sendrecv_rsync_client_packets(rtorrent_t) corenet_tcp_connect_rsync_port(rtorrent_t)