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 622A4138A1F for ; Thu, 7 Aug 2014 12:30:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D4B9E086E; Thu, 7 Aug 2014 12:30:48 +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 E236EE086E for ; Thu, 7 Aug 2014 12:30:47 +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 BBE653402B1 for ; Thu, 7 Aug 2014 12:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id ABFE718810 for ; Thu, 7 Aug 2014 12:30:44 +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: <1407414491.5fd609058ca8eec44bac6baf0a510511a79c6bce.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: 5fd609058ca8eec44bac6baf0a510511a79c6bce X-VCS-Branch: testing Date: Thu, 7 Aug 2014 12:30:44 +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: 65d10211-e5c8-42f9-b6fc-b9151ee88e4f X-Archives-Hash: 4721b310d1e1b2331415509093f75a9b commit: 5fd609058ca8eec44bac6baf0a510511a79c6bce Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 7 12:28:11 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Aug 7 12:28:11 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=5fd60905 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 5d53aa4..609de1f 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6752,3 +6752,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) +')