From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 92E5E1396D0 for ; Sat, 9 Sep 2017 02:43:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4EB991FC11F; Sat, 9 Sep 2017 02:43:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 17ABB1FC11F for ; Sat, 9 Sep 2017 02:43:06 +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 562713417DF for ; Sat, 9 Sep 2017 02:43:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E983B9089 for ; Sat, 9 Sep 2017 02:43:01 +0000 (UTC) From: "Jason Zaman" 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" Message-ID: <1504910931.a43e66289e81dcc53f4069387a15929f67db476f.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/cron.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: a43e66289e81dcc53f4069387a15929f67db476f X-VCS-Branch: master Date: Sat, 9 Sep 2017 02:43:01 +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: 2a71af91-4d8f-44cc-b6ab-c43da58244e4 X-Archives-Hash: 2c77062bd7f6daa6b914e16df73ec599 commit: a43e66289e81dcc53f4069387a15929f67db476f Author: David Sugar tresys com> AuthorDate: Wed Aug 30 16:07:07 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Fri Sep 8 22:48:51 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=a43e6628 cron: optional_policy for mta_* interfaces Patch to allow turning off of the mta module and still have cron module available. This version consolidates all mta_* interface uses into single optional block. policy/modules/contrib/cron.te | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/policy/modules/contrib/cron.te b/policy/modules/contrib/cron.te index 27467232..a8818d56 100644 --- a/policy/modules/contrib/cron.te +++ b/policy/modules/contrib/cron.te @@ -43,7 +43,6 @@ application_executable_file(anacron_exec_t) type cron_spool_t; files_type(cron_spool_t) -mta_system_content(cron_spool_t) type cron_var_lib_t; files_type(cron_var_lib_t) @@ -74,14 +73,12 @@ init_script_file(crond_initrc_exec_t) type crond_tmp_t; files_tmp_file(crond_tmp_t) files_poly_parent(crond_tmp_t) -mta_system_content(crond_tmp_t) type crond_unit_t; init_unit_file(crond_unit_t) type crond_var_run_t; files_pid_file(crond_var_run_t) -mta_system_content(crond_var_run_t) type crontab_exec_t; application_executable_file(crontab_exec_t) @@ -98,7 +95,6 @@ typealias crontab_tmp_t alias { auditadm_crontab_tmp_t secadm_crontab_tmp_t }; type system_cron_spool_t, cron_spool_type; files_type(system_cron_spool_t) -mta_system_content(system_cron_spool_t) type system_cronjob_t alias system_crond_t; init_daemon_domain(system_cronjob_t, anacron_exec_t) @@ -122,7 +118,23 @@ typealias user_cron_spool_t alias { staff_cron_spool_t sysadm_cron_spool_t uncon typealias user_cron_spool_t alias { auditadm_cron_spool_t secadm_cron_spool_t }; files_type(user_cron_spool_t) ubac_constrained(user_cron_spool_t) -mta_system_content(user_cron_spool_t) + +type user_cron_spool_log_t; +logging_log_file(user_cron_spool_log_t) +ubac_constrained(user_cron_spool_log_t) + +ifdef(`enable_mcs',` + init_ranged_daemon_domain(crond_t, crond_exec_t, s0 - mcs_systemhigh) +') + +optional_policy(` + mta_system_content(cron_spool_t) + mta_system_content(crond_tmp_t) + mta_system_content(crond_var_run_t) + mta_system_content(system_cron_spool_t) + mta_system_content(user_cron_spool_t) + mta_system_content(user_cron_spool_log_t) +') ifdef(`distro_gentoo',` # Logging for atd jobs @@ -132,10 +144,6 @@ ifdef(`distro_gentoo',` logging_syslog_managed_log_file(cron_log_t, "cron.log") ') -ifdef(`enable_mcs',` - init_ranged_daemon_domain(crond_t, crond_exec_t, s0 - mcs_systemhigh) -') - ############################## # # Common crontab local policy