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 41FA1138334 for ; Fri, 8 Jun 2018 10:07:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7DBD7E0837; Fri, 8 Jun 2018 10:07:31 +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 B7FFBE0835 for ; Fri, 8 Jun 2018 10:07:30 +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 57B5A335C97 for ; Fri, 8 Jun 2018 10:07:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 825252D9 for ; Fri, 8 Jun 2018 10:07:26 +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: <1528449776.6e80ac7a0685e7dedaae81a7d3bb206fe4b9f997.perfinion@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/systemd.fc policy/modules/system/systemd.if policy/modules/system/systemd.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 6e80ac7a0685e7dedaae81a7d3bb206fe4b9f997 X-VCS-Branch: master Date: Fri, 8 Jun 2018 10:07:26 +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: 98b445d2-dccf-4967-ae72-5c4d12b5eaf9 X-Archives-Hash: ae548aa2367a97abe8919186883ac455 commit: 6e80ac7a0685e7dedaae81a7d3bb206fe4b9f997 Author: Chris PeBenito ieee org> AuthorDate: Fri Jun 8 00:17:15 2018 +0000 Commit: Jason Zaman gentoo org> CommitDate: Fri Jun 8 09:22:56 2018 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=6e80ac7a systemd: Move lines. policy/modules/system/systemd.fc | 4 ++-- policy/modules/system/systemd.if | 41 ++++++++++++++++++---------------------- policy/modules/system/systemd.te | 6 +++--- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/policy/modules/system/systemd.fc b/policy/modules/system/systemd.fc index df1a4b2e..277c7fc4 100644 --- a/policy/modules/system/systemd.fc +++ b/policy/modules/system/systemd.fc @@ -1,3 +1,5 @@ +/etc/udev/hwdb\.bin -- gen_context(system_u:object_r:systemd_hwdb_t,s0) + /usr/bin/systemd-analyze -- gen_context(system_u:object_r:systemd_analyze_exec_t,s0) /usr/bin/systemd-cgtop -- gen_context(system_u:object_r:systemd_cgtop_exec_t,s0) /usr/bin/systemd-coredump -- gen_context(system_u:object_r:systemd_coredump_exec_t,s0) @@ -39,8 +41,6 @@ /usr/lib/systemd/system/systemd-binfmt.* -- gen_context(system_u:object_r:systemd_binfmt_unit_t,s0) /usr/lib/systemd/system/systemd-networkd.* gen_context(system_u:object_r:systemd_networkd_unit_t,s0) -/etc/udev/hwdb.bin -- gen_context(system_u:object_r:systemd_hwdb_t,s0) - /var/lib/systemd/backlight(/.*)? gen_context(system_u:object_r:systemd_backlight_var_lib_t,s0) /var/lib/systemd/coredump(/.*)? gen_context(system_u:object_r:systemd_coredump_var_lib_t,s0) /var/lib/systemd/linger(/.*)? gen_context(system_u:object_r:systemd_logind_var_lib_t,s0) diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index 75bbeead..34685088 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -19,6 +19,24 @@ interface(`systemd_log_parse_environment',` typeattribute $1 systemd_log_parse_env_type; ') +####################################### +## +## Allow domain to read udev hwdb file +## +## +## +## domain allowed access +## +## +# +interface(`systemd_read_hwdb',` + gen_require(` + type systemd_hwdb_t; + ') + + read_files_pattern($1, systemd_hwdb_t, systemd_hwdb_t) +') + ###################################### ## ## Read systemd_login PID files. @@ -770,26 +788,3 @@ interface(`systemd_getattr_updated_runtime',` getattr_files_pattern($1, systemd_update_run_t, systemd_update_run_t) ') - - -####################################### -## -## Allow domain to read udev hwdb file -## -## -## -## domain allowed access -## -## -# -interface(`systemd_read_hwdb',` - gen_require(` - type systemd_hwdb_t; - ') - - read_files_pattern($1, systemd_hwdb_t, systemd_hwdb_t) -') - - - - diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index c324d3bf..1cf5fb95 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -335,14 +335,14 @@ optional_policy(` # allow systemd_hw_t systemd_hwdb_t:file { manage_file_perms relabelfrom relabelto }; - files_etc_filetrans(systemd_hw_t, systemd_hwdb_t, file) -files_search_pids(systemd_hw_t) -init_read_state(systemd_hw_t) +files_search_pids(systemd_hw_t) selinux_get_fs_mount(systemd_hw_t) +init_read_state(systemd_hw_t) + seutil_read_config(systemd_hw_t) seutil_read_file_contexts(systemd_hw_t)