2018-06-23 13:00:56 +00:00
|
|
|
policy_module(mongodb, 1.3.0)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type mongod_t;
|
|
|
|
type mongod_exec_t;
|
|
|
|
init_daemon_domain(mongod_t, mongod_exec_t)
|
|
|
|
|
|
|
|
type mongod_initrc_exec_t;
|
|
|
|
init_script_file(mongod_initrc_exec_t)
|
|
|
|
|
|
|
|
type mongod_log_t;
|
|
|
|
logging_log_file(mongod_log_t)
|
|
|
|
|
|
|
|
type mongod_var_lib_t;
|
|
|
|
files_type(mongod_var_lib_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type mongod_runtime_t alias mongod_var_run_t;
|
|
|
|
files_pid_file(mongod_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow mongod_t self:process signal;
|
|
|
|
allow mongod_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
|
|
|
manage_dirs_pattern(mongod_t, mongod_log_t, mongod_log_t)
|
|
|
|
append_files_pattern(mongod_t, mongod_log_t, mongod_log_t)
|
|
|
|
create_files_pattern(mongod_t, mongod_log_t, mongod_log_t)
|
|
|
|
setattr_files_pattern(mongod_t, mongod_log_t, mongod_log_t)
|
|
|
|
logging_log_filetrans(mongod_t, mongod_log_t, dir)
|
|
|
|
|
|
|
|
manage_dirs_pattern(mongod_t, mongod_var_lib_t, mongod_var_lib_t)
|
|
|
|
manage_files_pattern(mongod_t, mongod_var_lib_t, mongod_var_lib_t)
|
|
|
|
files_var_lib_filetrans(mongod_t, mongod_var_lib_t, dir)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(mongod_t, mongod_runtime_t, mongod_runtime_t)
|
|
|
|
manage_files_pattern(mongod_t, mongod_runtime_t, mongod_runtime_t)
|
|
|
|
files_pid_filetrans(mongod_t, mongod_runtime_t, dir)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(mongod_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_unlabeled(mongod_t)
|
|
|
|
corenet_all_recvfrom_netlabel(mongod_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(mongod_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(mongod_t)
|
|
|
|
corenet_tcp_bind_generic_node(mongod_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(mongod_t)
|
|
|
|
dev_read_urand(mongod_t)
|
|
|
|
|
|
|
|
files_read_etc_files(mongod_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(mongod_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(mongod_t)
|