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 EB24313877A for ; Thu, 7 Aug 2014 12:41:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7FF3E08A2; Thu, 7 Aug 2014 12:41:53 +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 28E29E0886 for ; Thu, 7 Aug 2014 12:41:53 +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 52B0F3402B1 for ; Thu, 7 Aug 2014 12:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 4909E1881A for ; Thu, 7 Aug 2014 12:41:50 +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: <1407414823.3b8d61235fe8f516700617bf6b8750c0c734a66b.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:testing commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/files.if X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 3b8d61235fe8f516700617bf6b8750c0c734a66b X-VCS-Branch: testing Date: Thu, 7 Aug 2014 12:41:50 +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: 119968d4-4a94-4f08-bfce-35a8c067e9d1 X-Archives-Hash: 5c81f87eba76a0434db6be36880e7aba commit: 3b8d61235fe8f516700617bf6b8750c0c734a66b Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 7 12:28:11 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Aug 7 12:33:43 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=3b8d6123 Introduce files_relabel_all_pids The files_relabel_all_pids allows for relabelfrom/relabelto privileges on files, symbolic links and directories (for now) of the types associated with the pidfile attribute, which basically is *_var_run_t and var_run_t. --- policy/modules/kernel/files.if | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index 105c7c2..9f260ab 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6781,3 +6781,24 @@ interface(`files_manage_non_security_file_type',` manage_sock_files_pattern($1, non_security_file_type, non_security_file_type) ') +######################################## +## +## Relabel all pidfile resources. +## +## +## +## Domain allowed access. +## +## +## +# +interface(`files_relabel_all_pids',` + gen_require(` + attribute pidfile; + ') + + allow $1 pidfile:dir list_dir_perms; + relabel_dirs_pattern($1, pidfile, pidfile) + relabel_files_pattern($1, pidfile, pidfile) + relabel_lnk_files_pattern($1, pidfile, pidfile) +')