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 2204913885E for ; Mon, 4 Feb 2013 19:17:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C60B321C002; Mon, 4 Feb 2013 19:17:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6024321C001 for ; Mon, 4 Feb 2013 19:17:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 67CA633DE0D for ; Mon, 4 Feb 2013 19:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 43388E4095 for ; Mon, 4 Feb 2013 19:17:36 +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: <1360005132.7b7a721d232f16979f836ab3e94facfdd4aaeb5d.SwifT@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/mount.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 7b7a721d232f16979f836ab3e94facfdd4aaeb5d X-VCS-Branch: master Date: Mon, 4 Feb 2013 19:17:36 +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: dd206510-3f9e-46fe-a298-2f45f3889c34 X-Archives-Hash: de3abb407fbfe40e7ed47db3df75158b commit: 7b7a721d232f16979f836ab3e94facfdd4aaeb5d Author: Laurent Bigonville bigon be> AuthorDate: Sat Jan 12 21:32:26 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Mon Feb 4 19:12:12 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=7b7a721d Add mount_var_run_t type and allow mount_t domain to manage the files and directories In Debian, mount store some information (a utab file) under /var/run/mount directory. This is inspired by the fedora policy. --- policy/modules/system/mount.te | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te index 36f33d3..1c86924 100644 --- a/policy/modules/system/mount.te +++ b/policy/modules/system/mount.te @@ -26,6 +26,9 @@ files_type(mount_loopback_t) type mount_tmp_t; files_tmp_file(mount_tmp_t) +type mount_var_run_t; +files_pid_file(mount_var_run_t) + # causes problems with interfaces when # this is optionally declared in monolithic # policy--duplicate type declaration @@ -49,6 +52,11 @@ can_exec(mount_t, mount_exec_t) files_tmp_filetrans(mount_t, mount_tmp_t, { file dir }) +create_dirs_pattern(mount_t, mount_var_run_t, mount_var_run_t) +create_files_pattern(mount_t, mount_var_run_t, mount_var_run_t) +rw_files_pattern(mount_t, mount_var_run_t, mount_var_run_t) +files_pid_filetrans(mount_t, mount_var_run_t, dir, "mount") + kernel_read_system_state(mount_t) kernel_read_kernel_sysctls(mount_t) kernel_setsched(mount_t)