aboutsummaryrefslogtreecommitdiff
blob: 1504b392821fa44860bb01d321321a652e3a930a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
policy_module(dirmngr, 1.5.1)

########################################
#
# 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)

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_runtime_t alias dirmngr_var_run_t;
files_pid_file(dirmngr_runtime_t)

type dirmngr_home_t;
userdom_user_home_content(dirmngr_home_t)

########################################
#
# Local policy
#

allow dirmngr_t self:fifo_file rw_file_perms;

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;

allow dirmngr_t dirmngr_home_t:dir list_dir_perms;
allow dirmngr_t dirmngr_home_t:file read_file_perms;

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)

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 })

kernel_read_crypto_sysctls(dirmngr_t)

dev_read_rand(dirmngr_t)

sysnet_dns_name_resolve(dirmngr_t)

corenet_tcp_connect_http_port(dirmngr_t)
corenet_tcp_connect_pgpkeyserver_port(dirmngr_t)
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)
')