Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_make_file(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_make_file',`
Chris PeBenito b4cd15
requires_block_template(files_make_file_depend,$2)
Chris PeBenito b4cd15
typeattribute $1 file_type;
Chris PeBenito b4cd15
filesystem_associate($1,optional)
Chris PeBenito 33bc0d
filesystem_noxattr_associate($1,optional)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_make_file_depend',`
Chris PeBenito b4cd15
attribute file_type;
Chris PeBenito b4cd15
filesystem_associate_depend
Chris PeBenito a266e3
filesystem_noxattr_associate_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# files_make_mountpoint(type,[`optional'])
Chris PeBenito a2d824
#
Chris PeBenito a2d824
define(`files_make_mountpoint',`
Chris PeBenito a2d824
requires_block_template(files_make_mountpoint_depend,$2)
Chris PeBenito a2d824
typeattribute $1 mountpoint;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
define(`files_make_mountpoint_depend',`
Chris PeBenito a2d824
attribute mountpoint;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
########################################
Chris PeBenito a2d824
#
Chris PeBenito 8a0da1
# files_get_all_file_attributes(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 8a0da1
define(`files_get_all_file_attributes',`
Chris PeBenito 8a0da1
requires_block_template(files_get_all_file_attributes_depend,$2)
Chris PeBenito b4cd15
allow $1 file_type:dir { search getattr };
Chris PeBenito b4cd15
allow $1 file_type:file getattr;
Chris PeBenito b4cd15
allow $1 file_type:lnk_file getattr;
Chris PeBenito b4cd15
allow $1 file_type:fifo_file getattr;
Chris PeBenito b4cd15
allow $1 file_type:sock_file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 8a0da1
define(`files_get_all_file_attributes_depend',`
Chris PeBenito b4cd15
attribute file_type;
Chris PeBenito b4cd15
class dir { search getattr };
Chris PeBenito b4cd15
class file getattr;
Chris PeBenito b4cd15
class lnk_file getattr;
Chris PeBenito b4cd15
class fifo_file getattr;
Chris PeBenito b4cd15
class sock_file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito f9438f
#
Chris PeBenito ee5772
# files_manage_all_files_labels(type,[`optional'])
Chris PeBenito ee5772
#
Chris PeBenito ee5772
define(`files_manage_all_files_labels',`
Chris PeBenito ee5772
requires_block_template(files_manage_all_files_labels_depend,$2)
Chris PeBenito ee5772
allow $1 file_type:dir { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 file_type:file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 file_type:lnk_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 file_type:fifo_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 file_type:sock_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 file_type:blk_file { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 file_type:chr_file { getattr relabelfrom };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
define(`files_manage_all_files_labels_depend',`
Chris PeBenito ee5772
attribute file_type;
Chris PeBenito ee5772
class dir { relabelfrom relabelto };
Chris PeBenito ee5772
class file { relabelfrom relabelto };
Chris PeBenito ee5772
class lnk_file { relabelfrom relabelto };
Chris PeBenito ee5772
class fifo_file { relabelfrom relabelto };
Chris PeBenito ee5772
class sock_file { relabelfrom relabelto };
Chris PeBenito ee5772
class blk_file relabelfrom;
Chris PeBenito ee5772
class chr_file relabelfrom;
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito 9f2f9e
# files_search_all_directories(domain)
Chris PeBenito f9438f
#
Chris PeBenito f9438f
define(`files_search_all_directories',`
Chris PeBenito 9f2f9e
requires_block_template(files_search_all_directories_depend)
Chris PeBenito f9438f
allow $1 file_type:dir search;
Chris PeBenito f9438f
')
Chris PeBenito f9438f
Chris PeBenito ee5772
define(`files_search_all_directories_depend',`
Chris PeBenito f9438f
attribute file_type;
Chris PeBenito f9438f
class dir search;
Chris PeBenito f9438f
')
Chris PeBenito f9438f
Chris PeBenito f9438f
########################################
Chris PeBenito ee5772
#
Chris PeBenito 9f2f9e
# files_ignore_search_all_directories(domain)
Chris PeBenito 9f2f9e
#
Chris PeBenito 9f2f9e
define(`files_ignore_search_all_directories',`
Chris PeBenito 9f2f9e
requires_block_template(files_ignore_search_all_directories_depend)
Chris PeBenito 9f2f9e
dontaudit $1 file_type:dir search;
Chris PeBenito 9f2f9e
')
Chris PeBenito 9f2f9e
Chris PeBenito 9f2f9e
define(`files_ignore_search_all_directories_depend',`
Chris PeBenito 9f2f9e
attribute file_type;
Chris PeBenito 9f2f9e
class dir search;
Chris PeBenito 9f2f9e
')
Chris PeBenito 9f2f9e
Chris PeBenito 9f2f9e
########################################
Chris PeBenito 9f2f9e
#
Chris PeBenito ee5772
# files_read_all_directories(type,[`optional'])
Chris PeBenito ee5772
#
Chris PeBenito ee5772
define(`files_read_all_directories',`
Chris PeBenito ee5772
requires_block_template(files_read_all_directories_depend,$2)
Chris PeBenito ee5772
allow $1 file_type:dir { getattr search read };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
define(`files_read_all_directories_depend',`
Chris PeBenito ee5772
attribute file_type;
Chris PeBenito ee5772
class dir { getattr search read };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# files_mount_on_all_mountpoints(type,[`optional'])
Chris PeBenito a2d824
#
Chris PeBenito a2d824
define(`files_mount_on_all_mountpoints',`
Chris PeBenito a2d824
requires_block_template(files_mount_on_all_mountpoints_depend,$2)
Chris PeBenito a2d824
allow $1 mountpoint:dir { getattr search mounton };
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
define(`files_mount_on_all_mountpoints_depend',`
Chris PeBenito a2d824
attribute mountpoint;
Chris PeBenito a2d824
class dir { getattr search mounton };
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
########################################
Chris PeBenito a2d824
#
Chris PeBenito b4cd15
# files_read_root_dir(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_read_root_dir',`
Chris PeBenito b4cd15
requires_block_template(files_read_root_dir_depend,$2)
Chris PeBenito b4cd15
allow $1 root_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 root_t:lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_read_root_dir_depend',`
Chris PeBenito b4cd15
type root_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_create_root_dir_entry(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_create_root_dir_entry',`
Chris PeBenito b4cd15
requires_block_template(files_create_root_dir_entry_depend,$2)
Chris PeBenito b4cd15
allow $1 root_t:dir { getattr search read write add_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_root_dir_entry_depend',`
Chris PeBenito b4cd15
type root_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 9f2f9e
# files_ignore_read_rootfs_file(domain)
Chris PeBenito 9f2f9e
#
Chris PeBenito 9f2f9e
define(`files_ignore_read_rootfs_file',`
Chris PeBenito 9f2f9e
requires_block_template(files_ignore_read_rootfs_file_depend)
Chris PeBenito 9f2f9e
dontaudit $1 root_t:file read;
Chris PeBenito 9f2f9e
')
Chris PeBenito 9f2f9e
Chris PeBenito 9f2f9e
define(`files_ignore_read_rootfs_file_depend',`
Chris PeBenito 9f2f9e
type root_t;
Chris PeBenito 9f2f9e
class file read;
Chris PeBenito 9f2f9e
')
Chris PeBenito 9f2f9e
Chris PeBenito 9f2f9e
########################################
Chris PeBenito 9f2f9e
#
Chris PeBenito 7aebdb
# files_ignore_modify_rootfs_file(domain,[`optional'])
Chris PeBenito 7aebdb
#
Chris PeBenito 7aebdb
define(`files_ignore_modify_rootfs_file',`
Chris PeBenito 7aebdb
requires_block_template(files_ignore_modify_rootfs_file_depend,$2)
Chris PeBenito 7aebdb
dontaudit $1 root_t:file { read write };
Chris PeBenito 7aebdb
')
Chris PeBenito 7aebdb
Chris PeBenito 7aebdb
define(`files_ignore_modify_rootfs_file_depend',`
Chris PeBenito 7aebdb
type root_t;
Chris PeBenito 7aebdb
class file { read write };
Chris PeBenito 7aebdb
')
Chris PeBenito 7aebdb
Chris PeBenito 7aebdb
########################################
Chris PeBenito 7aebdb
#
Chris PeBenito 7aebdb
# files_ignore_modify_rootfs_device(domain,[`optional'])
Chris PeBenito 7aebdb
#
Chris PeBenito 7aebdb
define(`files_ignore_modify_rootfs_device',`
Chris PeBenito 7aebdb
requires_block_template(files_ignore_modify_rootfs_device_depend,$2)
Chris PeBenito 7aebdb
dontaudit $1 root_t:chr_file { read write };
Chris PeBenito 7aebdb
')
Chris PeBenito 7aebdb
Chris PeBenito 7aebdb
define(`files_ignore_modify_rootfs_device_depend',`
Chris PeBenito 7aebdb
type root_t;
Chris PeBenito 7aebdb
class chr_file { read write };
Chris PeBenito 7aebdb
')
Chris PeBenito 7aebdb
Chris PeBenito 7aebdb
########################################
Chris PeBenito 7aebdb
#
Chris PeBenito b4cd15
# files_create_private_root_dir_entry(domain,privatetype,[class(es)],[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_create_private_root_dir_entry',`
Chris PeBenito b4cd15
requires_block_template(files_create_private_root_dir_entry_depend,$2)
Chris PeBenito b4cd15
allow $1 root_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
ifelse(`$3',`',`
Chris PeBenito b4cd15
type_transition $1 root_t:file $2;
Chris PeBenito b4cd15
',`
Chris PeBenito b4cd15
type_transition $1 root_t:$3 $2;
Chris PeBenito b4cd15
') dnl end ifelse
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_private_root_dir_entry_depend',`
Chris PeBenito b4cd15
type root_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_remove_root_dir_entry(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_remove_root_dir_entry',`
Chris PeBenito b4cd15
requires_block_template(files_remove_root_dir_entry_depend,$2)
Chris PeBenito b4cd15
allow $1 root_t:dir { getattr search read write remove_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_remove_root_dir_entry_depend',`
Chris PeBenito b4cd15
type root_t;
Chris PeBenito b4cd15
class dir { getattr search read write remove_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# files_unmount_root_filesystem(domain,[`optional'])
Chris PeBenito a2d824
#
Chris PeBenito a2d824
define(`files_unmount_root_filesystem',`
Chris PeBenito a2d824
requires_block_template(files_unmount_root_filesystem_depend,$2)
Chris PeBenito a2d824
allow $1 root_t:filesystem unmount;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
define(`files_unmount_root_filesystem_depend',`
Chris PeBenito a2d824
type root_t;
Chris PeBenito a2d824
class filesystem unmount;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
########################################
Chris PeBenito a2d824
#
Chris PeBenito b4cd15
# files_read_general_system_config(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_read_general_system_config',`
Chris PeBenito b4cd15
requires_block_template(files_read_general_system_config_depend,$2)
Chris PeBenito b4cd15
allow $1 etc_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 etc_t:file { getattr read };
Chris PeBenito b4cd15
allow $1 etc_t:lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_read_general_system_config_depend',`
Chris PeBenito b4cd15
type etc_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class file { getattr read };
Chris PeBenito b4cd15
class lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_execute_system_config_script(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_execute_system_config_script',`
Chris PeBenito b4cd15
requires_block_template(files_execute_system_config_script_depend,$2)
Chris PeBenito b4cd15
allow $1 etc_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 etc_t:lnk_file { getattr read };
Chris PeBenito b4cd15
allow $1 etc_t:file { getattr read execute execute_no_trans };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_execute_system_config_script_depend',`
Chris PeBenito b4cd15
type etc_t, etc_runtime_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class lnk_file { getattr read };
Chris PeBenito b4cd15
class file { getattr read execute execute_no_trans };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_create_boot_flag(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# /halt, /.autofsck, etc
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_create_boot_flag',`
Chris PeBenito b4cd15
requires_block_template(files_create_boot_flag_depend,$2)
Chris PeBenito b4cd15
allow $1 root_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
allow $1 etc_runtime_t:file { create read write setattr unlink };
Chris PeBenito b4cd15
type_transition $1 root_t:file etc_runtime_t;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_boot_flag_depend',`
Chris PeBenito b4cd15
type root_t, etc_runtime_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name };
Chris PeBenito b4cd15
class file { create read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_create_runtime_system_config(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_create_runtime_system_config',`
Chris PeBenito b4cd15
requires_block_template(files_create_runtime_system_config_depend,$2)
Chris PeBenito b4cd15
allow $1 etc_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
allow $1 etc_runtime_t:file { create read write setattr unlink };
Chris PeBenito b4cd15
type_transition $1 etc_t:file etc_runtime_t;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_runtime_system_config_depend',`
Chris PeBenito b4cd15
type etc_t, etc_runtime_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name };
Chris PeBenito b4cd15
class file { create read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_read_runtime_system_config(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_read_runtime_system_config',`
Chris PeBenito b4cd15
requires_block_template(files_read_runtime_system_config_depend,$2)
Chris PeBenito b4cd15
allow $1 etc_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 etc_runtime_t:file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_runtime_system_config_depend',`
Chris PeBenito b4cd15
type etc_t, etc_runtime_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_create_private_config(domain,privatetype,[class(es)],[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_create_private_config',`
Chris PeBenito b4cd15
requires_block_template(files_create_private_config_depend,$4)
Chris PeBenito b4cd15
allow $1 etc_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
ifelse(`$3',`',`
Chris PeBenito b4cd15
type_transition $1 etc_t:file $2;
Chris PeBenito b4cd15
',`
Chris PeBenito b4cd15
type_transition $1 etc_t:$3 $2;
Chris PeBenito b4cd15
') dnl end ifelse
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_create_private_config_depend',`
Chris PeBenito b4cd15
type etc_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_list_home_directories(type,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_list_home_directories',`
Chris PeBenito 3ce6cb
requires_block_template(files_list_home_directories_depend,$2)
Chris PeBenito 3ce6cb
allow $1 home_root_t:dir { getattr search read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_list_home_directories_depend',`
Chris PeBenito 3ce6cb
type home_root_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_create_private_tmp_data(domain,private_type,[object class(es)],[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_create_private_tmp_data',`
Chris PeBenito 3ce6cb
requires_block_template(files_create_private_tmp_data_depend,$2)
Chris PeBenito 3ce6cb
allow $1 tmp_t:dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
ifelse(`$3',`',`
Chris PeBenito 3ce6cb
type_transition $1 tmp_t:file $2;
Chris PeBenito 3ce6cb
',`
Chris PeBenito 3ce6cb
type_transition $1 tmp_t:$3 $2;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
typeattribute $1 tmpfile;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_create_private_tmp_data_depend',`
Chris PeBenito 3ce6cb
attribute tmpfile;
Chris PeBenito 3ce6cb
type tmp_t;
Chris PeBenito 3ce6cb
class dir { getattr search read write add_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_remove_all_tmp_data(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_remove_all_tmp_data',`
Chris PeBenito 3ce6cb
requires_block_template(files_remove_all_tmp_data_depend,$2)
Chris PeBenito 3ce6cb
allow $1 tmpfile:dir { getattr search read write add_name remove_name rmdir };
Chris PeBenito 3ce6cb
allow $1 tmpfile:file { getattr unlink };
Chris PeBenito 3ce6cb
allow $1 tmpfile:lnk_file { getattr unlink };
Chris PeBenito 3ce6cb
allow $1 tmpfile:fifo_file { getattr unlink };
Chris PeBenito 3ce6cb
allow $1 tmpfile:sock_file { getattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_remove_all_tmp_data_depend',`
Chris PeBenito 3ce6cb
attribute tmpfile;
Chris PeBenito 3ce6cb
class dir { getattr search read write add_name remove_name rmdir };
Chris PeBenito 3ce6cb
class file { getattr unlink };
Chris PeBenito 3ce6cb
class lnk_file { getattr unlink };
Chris PeBenito 3ce6cb
class fifo_file { getattr unlink };
Chris PeBenito 3ce6cb
class sock_file { getattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_read_general_application_resources(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_read_general_application_resources',`
Chris PeBenito 3ce6cb
requires_block_template(files_read_general_application_resources_depend,$2)
Chris PeBenito 3ce6cb
allow $1 usr_t:dir { getattr search read };
Chris PeBenito 3ce6cb
allow $1 usr_t:{ file lnk_file } { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_read_general_application_resources_depend',`
Chris PeBenito 3ce6cb
type usr_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito 3ce6cb
class file { getattr read };
Chris PeBenito 3ce6cb
class lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_read_system_source_code(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_read_system_source_code',`
Chris PeBenito 3ce6cb
requires_block_template(files_read_system_source_code_depend)
Chris PeBenito 3ce6cb
allow $1 usr_t:dir search;
Chris PeBenito 3ce6cb
allow $1 src_t:dir { getattr search read };
Chris PeBenito 3ce6cb
allow $1 src_t:{ file lnk_file } { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_read_system_source_code_depend',`
Chris PeBenito 3ce6cb
type usr_t, src_t;
Chris PeBenito 3ce6cb
class dir { getattr search read };
Chris PeBenito 3ce6cb
class file { getattr read };
Chris PeBenito 3ce6cb
class lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_search_system_state_data_directory(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_search_system_state_data_directory',`
Chris PeBenito 3ce6cb
requires_block_template(files_search_system_state_data_directory_depend)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_search_system_state_data_directory_depend',`
Chris PeBenito 3ce6cb
type var_t;
Chris PeBenito 3ce6cb
class dir search;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_manage_pseudorandom_saved_seed(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_manage_pseudorandom_saved_seed',`
Chris PeBenito 3ce6cb
requires_block_template(files_manage_pseudorandom_saved_seed_depend)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_lib_t:dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
allow $1 var_lib_t:file { getattr create read write setattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_manage_pseudorandom_saved_seed_depend',`
Chris PeBenito 3ce6cb
type var_t, var_lib_t;
Chris PeBenito 3ce6cb
class dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
class file { getattr create read write setattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 033c80
# files_manage_system_lock_files(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 033c80
define(`files_manage_system_lock_files',`
Chris PeBenito 033c80
requires_block_template(files_manage_system_lock_files_depend,$2)
Chris PeBenito b4cd15
allow $1 var_lock_t:dir { getattr search create read write setattr add_name remove_name rmdir };
Chris PeBenito b4cd15
allow $1 var_lock_t:file { getattr create read write setattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 033c80
define(`files_manage_system_lock_files_depend',`
Chris PeBenito b4cd15
type var_lock_t;
Chris PeBenito b4cd15
class dir { getattr search create read write setattr add_name remove_name rmdir };
Chris PeBenito b4cd15
class file { getattr create read write setattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# files_remove_all_lock_files(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`files_remove_all_lock_files',`
Chris PeBenito b4cd15
requires_block_template(files_remove_all_lock_files_depend,$2)
Chris PeBenito b4cd15
allow $1 lockfile:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
allow $1 lockfile:file { getattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`files_remove_all_lock_files_depend',`
Chris PeBenito b4cd15
attribute lockfile;
Chris PeBenito b4cd15
class dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
class file { getattr unlink };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_search_runtime_data_directory(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_search_runtime_data_directory',`
Chris PeBenito 3ce6cb
requires_block_template(files_search_runtime_data_directory_depend)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_run_t:dir search;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_search_runtime_data_directory_depend',`
Chris PeBenito 3ce6cb
type var_t, var_run_t;
Chris PeBenito 3ce6cb
class dir search;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
# files_read_runtime_data_directory(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 3ce6cb
define(`files_read_runtime_data_directory',`
Chris PeBenito 3ce6cb
requires_block_template(files_read_runtime_data_directory_depend)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_run_t:dir { getattr search read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 3ce6cb
define(`files_read_runtime_data_directory_depend',`
Chris PeBenito 3ce6cb
type var_t, var_run_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
')
Chris PeBenito a266e3
Chris PeBenito a266e3
########################################
Chris PeBenito a266e3
#
Chris PeBenito 3ce6cb
# files_create_daemon_runtime_data(domain,pidfile,[object class(es)])
Chris PeBenito a266e3
#
Chris PeBenito 3ce6cb
define(`files_create_daemon_runtime_data',`
Chris PeBenito 3ce6cb
requires_block_template(files_create_daemon_runtime_data_depend)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_run_t:dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
ifelse(`$3',`',`
Chris PeBenito 3ce6cb
type_transition $1 var_run_t:file $2;
Chris PeBenito 3ce6cb
',`
Chris PeBenito 3ce6cb
type_transition $1 var_run_t:$3 $2;
Chris PeBenito 3ce6cb
') dnl end ifelse
Chris PeBenito 3ce6cb
typeattribute $1 pidfile;
Chris PeBenito a266e3
')
Chris PeBenito a266e3
Chris PeBenito 3ce6cb
define(`files_create_daemon_runtime_data_depend',`
Chris PeBenito 3ce6cb
attribute pidfile;
Chris PeBenito 3ce6cb
type var_t, var_run_t;
Chris PeBenito 3ce6cb
class dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 3ce6cb
# files_modify_system_runtime_data(domain,[`optional'])
Chris PeBenito 3ce6cb
#
Chris PeBenito 3ce6cb
define(`files_modify_system_runtime_data',`
Chris PeBenito 3ce6cb
requires_block_template(files_modify_system_runtime_data_depend,$2)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_run_t:dir { getattr search read };
Chris PeBenito 3ce6cb
allow $1 var_run_t:file { getattr read write };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
define(`files_modify_system_runtime_data_depend',`
Chris PeBenito 3ce6cb
type var_t, var_run_t;
Chris PeBenito a266e3
class dir { getattr search read };
Chris PeBenito 3ce6cb
class file { getattr read write };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 3ce6cb
# files_remove_all_daemon_runtime_data(domain,[`optional'])
Chris PeBenito 3ce6cb
#
Chris PeBenito 3ce6cb
define(`files_remove_all_daemon_runtime_data',`
Chris PeBenito 3ce6cb
requires_block_template(files_remove_all_daemon_runtime_data_depend,$2)
Chris PeBenito 3ce6cb
allow $1 var_t:dir search;
Chris PeBenito 3ce6cb
allow $1 var_run_t:{ sock_file lnk_file } { getattr unlink };
Chris PeBenito 3ce6cb
allow $1 var_run_t:dir rmdir;
Chris PeBenito 3ce6cb
allow $1 pidfile:dir { getattr search read write add_name remove_name };
Chris PeBenito 3ce6cb
allow $1 pidfile:file { getattr unlink };
Chris PeBenito 3ce6cb
allow $1 pidfile:sock_file { getattr unlink };
Chris PeBenito 3ce6cb
')
Chris PeBenito a266e3
Chris PeBenito 3ce6cb
define(`files_remove_all_daemon_runtime_data_depend',`
Chris PeBenito 3ce6cb
attribute pidfile;
Chris PeBenito 3ce6cb
type var_t, var_run_t;
Chris PeBenito 3ce6cb
class dir { getattr search read write add_name remove_name rmdir };
Chris PeBenito 3ce6cb
class file { getattr unlink };
Chris PeBenito 3ce6cb
class lnk_file { getattr unlink };
Chris PeBenito 3ce6cb
class sock_file { getattr unlink };
Chris PeBenito a266e3
')