Chris PeBenito 17de1b
Chris PeBenito 17de1b
policy_module(slocate,1.1.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type locate_t;
Chris PeBenito 17de1b
type locate_exec_t;
Chris PeBenito 17de1b
init_system_domain(locate_t,locate_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type locate_log_t;
Chris PeBenito 17de1b
logging_log_file(locate_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type locate_var_lib_t;
Chris PeBenito 17de1b
files_type(locate_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow locate_t self:capability { chown dac_read_search dac_override fowner fsetid };
Chris PeBenito 17de1b
allow locate_t self:process { execmem execheap execstack };
Chris PeBenito 17de1b
allow locate_t self:fifo_file rw_file_perms;
Chris PeBenito 17de1b
allow locate_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow locate_t locate_var_lib_t:dir create_dir_perms;
Chris PeBenito 17de1b
allow locate_t locate_var_lib_t:file create_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(locate_t)
Chris PeBenito 17de1b
kernel_dontaudit_search_sysctl(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_getattr_all_blk_files(locate_t)
Chris PeBenito 17de1b
dev_getattr_all_chr_files(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_list_all(locate_t)
Chris PeBenito 17de1b
files_getattr_all_files(locate_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(locate_t)
Chris PeBenito 17de1b
files_read_etc_files(locate_t)
Chris PeBenito 17de1b
# mls Higher level directories will be refused, so dontaudit
Chris PeBenito 17de1b
files_dontaudit_getattr_all_dirs(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_xattr_fs(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_shared_libs(locate_t)
Chris PeBenito 17de1b
libs_use_ld_so(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(locate_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	cron_system_entry(locate_t, locate_exec_t)
Chris PeBenito 17de1b
')