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 0579A138350 for ; Sat, 15 Feb 2020 07:33:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A6072E0930; Sat, 15 Feb 2020 07:33:34 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 7C562E0920 for ; Sat, 15 Feb 2020 07:33:34 +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 A6BF834ED26 for ; Sat, 15 Feb 2020 07:33:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92321149 for ; Sat, 15 Feb 2020 07:33:29 +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: <1581751925.75852c7f3ca62154b160b706219d74142e0272c8.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/init.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 75852c7f3ca62154b160b706219d74142e0272c8 X-VCS-Branch: master Date: Sat, 15 Feb 2020 07:33:29 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 50ee86b7-48da-439a-bc56-1c053e9323af X-Archives-Hash: 512926d3d0307161b3e569d785cd2e51 commit: 75852c7f3ca62154b160b706219d74142e0272c8 Author: bauen1 gmail com> AuthorDate: Sat Feb 1 21:06:04 2020 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Feb 15 07:32:05 2020 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=75852c7f init: add interfaces for managing /run/systemd Signed-off-by: Jason Zaman gentoo.org> policy/modules/system/init.if | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 260cdf7b..03538310 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -1380,6 +1380,61 @@ interface(`init_list_pids',` files_search_pids($1) ') +###################################### +## +## Create symbolic links in the /run/systemd directory. +## +## +## +## Domain allowed access. +## +## +# +interface(`init_manage_pid_symlinks', ` + gen_require(` + type init_runtime_t; + ') + + allow $1 init_runtime_t:lnk_file create_lnk_file_perms; +') + +###################################### +## +## Create and write files in the /run/systemd directory. +## +## +## +## Domain allowed access. +## +## +# +interface(`init_create_write_pid_files', ` + gen_require(` + type init_runtime_t; + ') + + allow $1 init_runtime_t:file { create_file_perms write }; +') + +###################################### +## +## Create, read, write, and delete +## directories in the /run/systemd directory. +## +## +## +## Domain allowed access. +## +## +# +interface(`init_manage_pid_dirs', ` + gen_require(` + type init_runtime_t; + ') + + manage_dirs_pattern($1, init_runtime_t, init_runtime_t) +') + ######################################## ## ## Create files in an init PID directory.