Chris PeBenito 6a57b6
Chris PeBenito a52492
policy_module(slocate,1.0.1)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
#################################
Chris PeBenito 6a57b6
#
Chris PeBenito 6a57b6
# Declarations
Chris PeBenito 6a57b6
#
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
type locate_t;
Chris PeBenito 6a57b6
type locate_exec_t;
Chris PeBenito 6a57b6
init_system_domain(locate_t,locate_exec_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
type locate_log_t;
Chris PeBenito 6a57b6
logging_log_file(locate_log_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
type locate_var_lib_t;
Chris PeBenito 6a57b6
files_type(locate_var_lib_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
########################################
Chris PeBenito 6a57b6
#
Chris PeBenito 6a57b6
# Local policy
Chris PeBenito 6a57b6
#
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
allow locate_t self:capability { chown dac_read_search dac_override fowner fsetid };
Chris PeBenito 6a57b6
allow locate_t self:process { execmem execheap execstack };
Chris PeBenito 6a57b6
allow locate_t self:fifo_file rw_file_perms;
Chris PeBenito 6a57b6
allow locate_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
allow locate_t locate_var_lib_t:dir create_dir_perms;
Chris PeBenito 6a57b6
allow locate_t locate_var_lib_t:file create_file_perms;
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
kernel_read_system_state(locate_t)
Chris PeBenito 6a57b6
kernel_dontaudit_search_sysctl(locate_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
corecmd_exec_bin(locate_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
files_list_all(locate_t)
Chris PeBenito 6a57b6
files_getattr_all_files(locate_t)
Chris PeBenito 6a57b6
files_read_etc_runtime_files(locate_t)
Chris PeBenito 6a57b6
files_read_etc_files(locate_t)
Chris PeBenito 6a57b6
Chris PeBenito 6a57b6
fs_getattr_xattr_fs(locate_t)
Chris PeBenito 6a57b6
Chris PeBenito a52492
libs_use_shared_libs(locate_t)
Chris PeBenito a52492
libs_use_ld_so(locate_t)
Chris PeBenito a52492
Chris PeBenito a52492
miscfiles_read_localization(locate_t)
Chris PeBenito a52492
Chris PeBenito 6a57b6
optional_policy(`cron',`
Chris PeBenito 6a57b6
	cron_system_entry(locate_t, locate_exec_t)
Chris PeBenito 6a57b6
')