From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-685191-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A3737138A1F for <garchives@archives.gentoo.org>; Fri, 11 Apr 2014 17:48:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B0D6E0AA8; Fri, 11 Apr 2014 17:48:57 +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 EA085E0A98 for <gentoo-commits@lists.gentoo.org>; Fri, 11 Apr 2014 17:48:56 +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 222193401A6 for <gentoo-commits@lists.gentoo.org>; Fri, 11 Apr 2014 17:48:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 9D329188CC for <gentoo-commits@lists.gentoo.org>; Fri, 11 Apr 2014 17:48:53 +0000 (UTC) From: "Sven Vermeulen" <swift@gentoo.org> 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" <swift@gentoo.org> Message-ID: <1397238476.03082087c0e7ca8f63e18f125ae24b73ca0c9e1b.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/filesystem.if policy/modules/kernel/filesystem.te X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 03082087c0e7ca8f63e18f125ae24b73ca0c9e1b X-VCS-Branch: master Date: Fri, 11 Apr 2014 17:48:53 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: caaac499-8851-4172-9677-04e8c5efa567 X-Archives-Hash: eb28c783f01cc474fe38864ea5195ed1 commit: 03082087c0e7ca8f63e18f125ae24b73ca0c9e1b Author: Laurent Bigonville <bigon <AT> bigon <DOT> be> AuthorDate: Fri Apr 4 20:52:52 2014 +0000 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> CommitDate: Fri Apr 11 17:47:56 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=03082087 Create new xattrfs attribute and fs_getattr_all_xattr_fs() interface Create a new attribute and fs_getattr_all_xattr_fs() interface that will be used for all the filesystems that support xattr --- policy/modules/kernel/filesystem.if | 58 +++++++++++++++++++++++++++++++++++++ policy/modules/kernel/filesystem.te | 1 + 2 files changed, 59 insertions(+) diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if index e7d05e7..5b80ee2 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -108,6 +108,64 @@ interface(`fs_exec_noxattr',` ######################################## ## <summary> +## Transform specified type into a filesystem +## type which has extended attribute +## support. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`fs_xattr_type',` + gen_require(` + attribute xattrfs; + ') + + fs_type($1) + + typeattribute $1 xattrfs; +') + +######################################## +## <summary> +## Get the attributes of all the +## filesystems which have extended +## attributes. +## This includes pseudo filesystems. +## </summary> +## <desc> +## <p> +## Allow the specified domain to +## get the attributes of a filesystems +## which have extended attributes. +## Example attributes: +## </p> +## <ul> +## <li>Type of the file system (e.g., tmpfs)</li> +## <li>Size of the file system</li> +## <li>Available space on the file system</li> +## </ul> +## </desc> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <infoflow type="read" weight="5"/> +## <rolecap/> +# +interface(`fs_getattr_all_xattr_fs',` + gen_require(` + attribute xattrfs; + ') + + allow $1 xattrfs:filesystem getattr; +') + +######################################## +## <summary> ## Mount a persistent filesystem which ## has extended attributes, such as ## ext3, JFS, or XFS. diff --git a/policy/modules/kernel/filesystem.te b/policy/modules/kernel/filesystem.te index 0e09942..abaf5c0 100644 --- a/policy/modules/kernel/filesystem.te +++ b/policy/modules/kernel/filesystem.te @@ -8,6 +8,7 @@ policy_module(filesystem, 1.18.0) attribute filesystem_type; attribute filesystem_unconfined_type; attribute noxattrfs; +attribute xattrfs; ############################## #