2 ## <summary>policy for bitcoin</summary>
5 ########################################
7 ## Transition to bitcoin.
9 ## <param name="domain">
11 ## Domain allowed to transition.
15 interface(`bitcoin_domtrans',`
17 type bitcoin_t, bitcoin_exec_t;
20 corecmd_search_bin($1)
21 domtrans_pattern($1, bitcoin_exec_t, bitcoin_t)
25 ########################################
27 ## Execute bitcoin server in the bitcoin domain.
29 ## <param name="domain">
31 ## Domain allowed access.
35 interface(`bitcoin_initrc_domtrans',`
37 type bitcoin_initrc_exec_t;
40 init_labeled_script_domtrans($1, bitcoin_initrc_exec_t)
44 ########################################
46 ## Search bitcoin lib directories.
48 ## <param name="domain">
50 ## Domain allowed access.
54 interface(`bitcoin_search_lib',`
56 type bitcoin_var_lib_t;
59 allow $1 bitcoin_var_lib_t:dir search_dir_perms;
60 files_search_var_lib($1)
63 ########################################
65 ## Read bitcoin lib files.
67 ## <param name="domain">
69 ## Domain allowed access.
73 interface(`bitcoin_read_lib_files',`
75 type bitcoin_var_lib_t;
78 files_search_var_lib($1)
79 read_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
82 ########################################
84 ## Manage bitcoin lib files.
86 ## <param name="domain">
88 ## Domain allowed access.
92 interface(`bitcoin_manage_lib_files',`
94 type bitcoin_var_lib_t;
97 files_search_var_lib($1)
98 manage_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
101 ########################################
103 ## Manage bitcoin lib directories.
105 ## <param name="domain">
107 ## Domain allowed access.
111 interface(`bitcoin_manage_lib_dirs',`
113 type bitcoin_var_lib_t;
116 files_search_var_lib($1)
117 manage_dirs_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
121 ########################################
123 ## All of the rules required to administrate
124 ## a bitcoin environment
126 ## <param name="domain">
128 ## Domain allowed access.
131 ## <param name="role">
133 ## Role allowed access.
138 interface(`bitcoin_admin',`
141 type bitcoin_initrc_exec_t;
142 type bitcoin_var_lib_t;
145 allow $1 bitcoin_t:process { ptrace signal_perms };
146 ps_process_pattern($1, bitcoin_t)
148 bitcoin_initrc_domtrans($1)
149 domain_system_change_exemption($1)
150 role_transition $2 bitcoin_initrc_exec_t system_r;
153 files_search_var_lib($1)
154 admin_pattern($1, bitcoin_var_lib_t)