2020-04-21 15:03:01 +00:00
|
|
|
policy_module(dirmngr, 1.6.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type dirmngr_t;
|
|
|
|
type dirmngr_exec_t;
|
|
|
|
init_daemon_domain(dirmngr_t, dirmngr_exec_t)
|
|
|
|
|
|
|
|
type dirmngr_conf_t;
|
|
|
|
files_config_file(dirmngr_conf_t)
|
|
|
|
|
|
|
|
type dirmngr_initrc_exec_t;
|
|
|
|
init_script_file(dirmngr_initrc_exec_t)
|
|
|
|
|
|
|
|
type dirmngr_log_t;
|
|
|
|
logging_log_file(dirmngr_log_t)
|
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type dirmngr_runtime_t alias dirmngr_var_run_t;
|
|
|
|
files_pid_file(dirmngr_runtime_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
type dirmngr_tmp_t;
|
|
|
|
userdom_user_tmp_file(dirmngr_tmp_t)
|
|
|
|
userdom_user_runtime_content(dirmngr_tmp_t)
|
|
|
|
|
|
|
|
type dirmngr_var_lib_t;
|
|
|
|
files_type(dirmngr_var_lib_t)
|
|
|
|
|
|
|
|
type dirmngr_home_t;
|
|
|
|
userdom_user_home_content(dirmngr_home_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2020-04-14 21:47:06 +00:00
|
|
|
allow dirmngr_t self:fifo_file rw_fifo_file_perms;
|
2019-12-24 10:10:39 +00:00
|
|
|
allow dirmngr_t self:unix_stream_socket rw_stream_socket_perms;
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
allow dirmngr_t dirmngr_conf_t:dir list_dir_perms;
|
|
|
|
allow dirmngr_t dirmngr_conf_t:file read_file_perms;
|
|
|
|
allow dirmngr_t dirmngr_conf_t:lnk_file read_lnk_file_perms;
|
|
|
|
|
2020-05-10 12:06:36 +00:00
|
|
|
manage_files_pattern(dirmngr_t, dirmngr_home_t, dirmngr_home_t)
|
|
|
|
allow dirmngr_t dirmngr_home_t:dir { create_dir_perms add_entry_dir_perms list_dir_perms };
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(dirmngr_t, dirmngr_log_t, dirmngr_log_t)
|
|
|
|
append_files_pattern(dirmngr_t, dirmngr_log_t, dirmngr_log_t)
|
|
|
|
create_files_pattern(dirmngr_t, dirmngr_log_t, dirmngr_log_t)
|
|
|
|
setattr_files_pattern(dirmngr_t, dirmngr_log_t, dirmngr_log_t)
|
|
|
|
logging_log_filetrans(dirmngr_t, dirmngr_log_t, dir)
|
|
|
|
|
|
|
|
manage_dirs_pattern(dirmngr_t, dirmngr_var_lib_t, dirmngr_var_lib_t)
|
|
|
|
manage_files_pattern(dirmngr_t, dirmngr_var_lib_t, dirmngr_var_lib_t)
|
|
|
|
manage_lnk_files_pattern(dirmngr_t, dirmngr_var_lib_t, dirmngr_var_lib_t)
|
|
|
|
files_var_lib_filetrans(dirmngr_t, dirmngr_var_lib_t, dir)
|
|
|
|
|
|
|
|
manage_sock_files_pattern(dirmngr_t, dirmngr_tmp_t, dirmngr_tmp_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(dirmngr_t, dirmngr_runtime_t, dirmngr_runtime_t)
|
|
|
|
manage_files_pattern(dirmngr_t, dirmngr_runtime_t, dirmngr_runtime_t)
|
|
|
|
manage_sock_files_pattern(dirmngr_t, dirmngr_runtime_t, dirmngr_runtime_t)
|
|
|
|
files_pid_filetrans(dirmngr_t, dirmngr_runtime_t, { dir file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_crypto_sysctls(dirmngr_t)
|
|
|
|
|
|
|
|
dev_read_rand(dirmngr_t)
|
2020-05-10 12:34:35 +00:00
|
|
|
dev_read_urand(dirmngr_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
sysnet_dns_name_resolve(dirmngr_t)
|
|
|
|
|
|
|
|
corenet_tcp_connect_http_port(dirmngr_t)
|
|
|
|
corenet_tcp_connect_pgpkeyserver_port(dirmngr_t)
|
2020-05-10 06:47:34 +00:00
|
|
|
corenet_tcp_connect_tor_port(dirmngr_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
corenet_udp_bind_generic_node(dirmngr_t)
|
|
|
|
|
|
|
|
files_read_etc_files(dirmngr_t)
|
|
|
|
files_read_usr_files(dirmngr_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(dirmngr_t)
|
|
|
|
miscfiles_read_generic_certs(dirmngr_t)
|
|
|
|
|
|
|
|
userdom_search_user_home_dirs(dirmngr_t)
|
|
|
|
userdom_search_user_runtime(dirmngr_t)
|
|
|
|
userdom_user_runtime_filetrans(dirmngr_t, dirmngr_tmp_t, dir)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
gpg_agent_tmp_filetrans(dirmngr_t, dirmngr_tmp_t, sock_file)
|
|
|
|
gpg_runtime_filetrans(dirmngr_t, dirmngr_tmp_t, sock_file)
|
|
|
|
gpg_secret_filetrans(dirmngr_t, dirmngr_home_t, dir)
|
|
|
|
gpg_stream_connect_agent(dirmngr_t)
|
|
|
|
')
|