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
This commit is contained in:
Laurent Bigonville 2014-04-04 22:52:52 +02:00 committed by Chris PeBenito
parent 2a8d47d7b1
commit 408549f8d3
2 changed files with 59 additions and 0 deletions

View File

@ -106,6 +106,64 @@ interface(`fs_exec_noxattr',`
can_exec($1, noxattrfs)
')
########################################
## <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

View File

@ -8,6 +8,7 @@ policy_module(filesystem, 1.18.0)
attribute filesystem_type;
attribute filesystem_unconfined_type;
attribute noxattrfs;
attribute xattrfs;
##############################
#