add tmpfsfile support

This commit is contained in:
Chris PeBenito 2005-05-23 15:49:31 +00:00
parent 1c9f9a50df
commit 46410fd2b9
2 changed files with 48 additions and 1 deletions

View File

@ -73,6 +73,29 @@ define(`files_make_temporary_file_depend',`
attribute tmpfile;
')
########################################
## <interface name="files_make_tmpfs_file">
## <description>
## Transform the type into a file, for use on a
## virtual memory filesystem (tmpfs).
## </description>
## <parameter name="type">
## The type to be transformed.
## </parameter>
## <infoflow type="none"/>
## </interface>
#
define(`files_make_tmpfs_file',`
requires_block_template(`$0'_depend)
files_make_file($1)
filesystem_tmpfs_associate($1)
typeattribute $1 tmpfsfile;
')
define(`files_make_tmpfs_file_depend',`
attribute tmpfsfile;
')
########################################
#
# files_get_all_file_attributes(domain)
@ -407,6 +430,29 @@ class file { create ioctl read getattr lock write setattr append link unlink ren
class lnk_file { getattr read };
')
########################################
## <interface name="files_remove_general_system_config">
## <description>
## Delete system configuration files in /etc.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`files_remove_general_system_config',`
requires_block_template(`$0'_depend)
allow $1 etc_t:dir { getattr search read write remove_name };
allow $1 etc_t:file unlink;
')
define(`files_remove_general_system_config_depend',`
type etc_t;
class dir { getattr search read write remove_name };
class file unlink;
')
########################################
#
# files_execute_system_config_script(domain)

View File

@ -4,9 +4,10 @@ policy_module(files,1.0)
attribute file_type;
attribute lockfile;
attribute mountpoint;
attribute pidfile;
attribute tmpfile;
attribute mountpoint;
attribute tmpfsfile;
# default_t is the default type for files that do not
# match any specification in the file_contexts configuration