2006-01-16 14:58:58 +00:00
|
|
|
|
2008-10-14 15:46:36 +00:00
|
|
|
policy_module(slocate, 1.8.0)
|
2006-01-16 14:58:58 +00:00
|
|
|
|
|
|
|
#################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type locate_t;
|
|
|
|
type locate_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_system_domain(locate_t, locate_exec_t)
|
2006-01-16 14:58:58 +00:00
|
|
|
|
|
|
|
type locate_log_t;
|
|
|
|
logging_log_file(locate_log_t)
|
|
|
|
|
|
|
|
type locate_var_lib_t;
|
|
|
|
files_type(locate_var_lib_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow locate_t self:capability { chown dac_read_search dac_override fowner fsetid };
|
|
|
|
allow locate_t self:process { execmem execheap execstack };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow locate_t self:fifo_file rw_fifo_file_perms;
|
2006-01-16 14:58:58 +00:00
|
|
|
allow locate_t self:unix_stream_socket create_socket_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(locate_t, locate_var_lib_t, locate_var_lib_t)
|
|
|
|
manage_files_pattern(locate_t, locate_var_lib_t, locate_var_lib_t)
|
2006-01-16 14:58:58 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(locate_t)
|
|
|
|
kernel_dontaudit_search_sysctl(locate_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(locate_t)
|
|
|
|
|
2006-03-06 16:38:53 +00:00
|
|
|
dev_getattr_all_blk_files(locate_t)
|
|
|
|
dev_getattr_all_chr_files(locate_t)
|
|
|
|
|
2006-01-16 14:58:58 +00:00
|
|
|
files_list_all(locate_t)
|
|
|
|
files_getattr_all_files(locate_t)
|
2008-03-27 15:20:16 +00:00
|
|
|
files_getattr_all_pipes(locate_t)
|
2007-06-12 13:06:13 +00:00
|
|
|
files_getattr_all_sockets(locate_t)
|
2006-01-16 14:58:58 +00:00
|
|
|
files_read_etc_runtime_files(locate_t)
|
|
|
|
files_read_etc_files(locate_t)
|
|
|
|
|
2007-04-30 15:01:19 +00:00
|
|
|
fs_getattr_all_fs(locate_t)
|
2007-06-12 13:06:13 +00:00
|
|
|
fs_getattr_all_files(locate_t)
|
|
|
|
fs_list_all(locate_t)
|
2008-07-24 23:56:03 +00:00
|
|
|
fs_list_inotifyfs(locate_t)
|
2006-01-16 14:58:58 +00:00
|
|
|
|
2007-08-27 17:57:36 +00:00
|
|
|
# getpwnam
|
|
|
|
auth_use_nsswitch(locate_t)
|
|
|
|
|
2006-01-25 15:53:35 +00:00
|
|
|
miscfiles_read_localization(locate_t)
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
ifdef(`enable_mls',`
|
|
|
|
# On MLS machines will not be allowed to getattr Anything but SystemLow
|
|
|
|
files_dontaudit_getattr_all_dirs(locate_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-16 14:58:58 +00:00
|
|
|
cron_system_entry(locate_t, locate_exec_t)
|
|
|
|
')
|