|
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 |
5d7812 |
filesystem_associate_noxattr_depend
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
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 |
b4cd15 |
#
|
|
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 |
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 |
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 |
b4cd15 |
# files_read_general_shared_resources(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_general_shared_resources',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_read_general_shared_resources_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 usr_t:dir { getattr search read };
|
|
Chris PeBenito |
b4cd15 |
allow $1 usr_t:{ file lnk_file } { getattr read };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_general_shared_resources_depend',`
|
|
Chris PeBenito |
b4cd15 |
type usr_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_manage_pseudorandom_saved_seed(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_manage_pseudorandom_saved_seed',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_manage_pseudorandom_saved_seed_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_t:dir search;
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_lib_t:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_lib_t:file { getattr create read write setattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_manage_pseudorandom_saved_seed_depend',`
|
|
Chris PeBenito |
b4cd15 |
type usr_t;
|
|
Chris PeBenito |
b4cd15 |
class dir { getattr search read write add_name remove_name };
|
|
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_create_daemon_runtime_data(domain,pidfile,[object class(es)],[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_create_daemon_runtime_data',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_create_daemon_runtime_data_depend,$4)
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_t:dir search;
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_run_t:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
b4cd15 |
ifelse(`$3',`',`
|
|
Chris PeBenito |
b4cd15 |
type_transition $1 var_run_t:file $2;
|
|
Chris PeBenito |
b4cd15 |
',`
|
|
Chris PeBenito |
b4cd15 |
type_transition $1 var_run_t:$3 $2;
|
|
Chris PeBenito |
b4cd15 |
') dnl end ifelse
|
|
Chris PeBenito |
b4cd15 |
typeattribute $1 pidfile;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_create_daemon_runtime_data_depend',`
|
|
Chris PeBenito |
b4cd15 |
attribute pidfile;
|
|
Chris PeBenito |
b4cd15 |
type var_t, var_run_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_modify_system_runtime_data(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_modify_system_runtime_data',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_modify_system_runtime_data_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_t:dir search;
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_run_t:dir { getattr search read };
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_run_t:file { getattr read write };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_modify_system_runtime_data_depend',`
|
|
Chris PeBenito |
b4cd15 |
type var_t, var_run_t;
|
|
Chris PeBenito |
b4cd15 |
class dir { getattr search read };
|
|
Chris PeBenito |
b4cd15 |
class file { getattr read write };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
# files_remove_all_daemon_runtime_data(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_remove_all_daemon_runtime_data',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_remove_all_daemon_runtime_data_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_t:dir search;
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_run_t:{ sock_file lnk_file } { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
allow $1 var_run_t:dir rmdir;
|
|
Chris PeBenito |
b4cd15 |
allow $1 pidfile:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
b4cd15 |
allow $1 pidfile:file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
allow $1 pidfile:sock_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_remove_all_daemon_runtime_data_depend',`
|
|
Chris PeBenito |
b4cd15 |
attribute pidfile;
|
|
Chris PeBenito |
b4cd15 |
type var_t, var_run_t;
|
|
Chris PeBenito |
b4cd15 |
class dir { getattr search read write add_name remove_name rmdir };
|
|
Chris PeBenito |
b4cd15 |
class file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
class lnk_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
class sock_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
# files_create_private_tmp_data(domain,private_type,[object class(es)],[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_create_private_tmp_data',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_create_private_tmp_data_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmp_t:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
b4cd15 |
ifelse(`$3',`',`
|
|
Chris PeBenito |
b4cd15 |
type_transition $1 tmp_t:file $2;
|
|
Chris PeBenito |
b4cd15 |
',`
|
|
Chris PeBenito |
b4cd15 |
type_transition $1 tmp_t:$3 $2;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
typeattribute $1 tmpfile;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_create_private_tmp_data_depend',`
|
|
Chris PeBenito |
b4cd15 |
attribute tmpfile;
|
|
Chris PeBenito |
b4cd15 |
type etc_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 |
b4cd15 |
# files_remove_all_tmp_data(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_remove_all_tmp_data',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_remove_all_tmp_data_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmpfile:dir { getattr search read write add_name remove_name rmdir };
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmpfile:file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmpfile:lnk_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmpfile:fifo_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
allow $1 tmpfile:sock_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_remove_all_tmp_data_depend',`
|
|
Chris PeBenito |
b4cd15 |
attribute tmpfile;
|
|
Chris PeBenito |
b4cd15 |
class dir { getattr search read write add_name remove_name rmdir };
|
|
Chris PeBenito |
b4cd15 |
class file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
class lnk_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
class fifo_file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
class sock_file { getattr 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 |
b4cd15 |
# files_read_general_system_resources(domain,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_general_system_resources',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_read_general_system_resources_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 usr_t:dir { getattr search read };
|
|
Chris PeBenito |
b4cd15 |
allow $1 usr_t:{ file lnk_file } { getattr read };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_general_system_resources_depend',`
|
|
Chris PeBenito |
b4cd15 |
type usr_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_read_system_source_code(type,[`optional'])
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_system_source_code',`
|
|
Chris PeBenito |
b4cd15 |
requires_block_template(files_read_system_source_code_depend,$2)
|
|
Chris PeBenito |
b4cd15 |
allow $1 usr_t:dir search;
|
|
Chris PeBenito |
b4cd15 |
allow $1 src_t:dir { getattr search read };
|
|
Chris PeBenito |
b4cd15 |
allow $1 src_t:{ file lnk_file } { getattr read };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`files_read_system_source_code_depend',`
|
|
Chris PeBenito |
b4cd15 |
type usr_t, src_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 |
')
|