|
Chris PeBenito |
57869a |
## <summary>Policy for GNU Privacy Guard and related programs.</summary>
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
b2b38c |
#######################################
|
|
Chris PeBenito |
414e41 |
## <summary>
|
|
Chris PeBenito |
e88003 |
## The per user domain template for the gpg module.
|
|
Chris PeBenito |
414e41 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <desc>
|
|
Chris PeBenito |
414e41 |
##
|
|
Chris PeBenito |
414e41 |
## This template creates the types and rules for GPG,
|
|
Chris PeBenito |
414e41 |
## GPG-agent, and GPG helper programs. This protects
|
|
Chris PeBenito |
414e41 |
## the user keys and secrets, and runs the programs
|
|
Chris PeBenito |
414e41 |
## in domains specific to the user type.
|
|
Chris PeBenito |
414e41 |
##
|
|
Chris PeBenito |
414e41 |
##
|
|
Chris PeBenito |
e88003 |
## This is invoked automatically for each user and
|
|
Chris PeBenito |
e88003 |
## generally does not need to be invoked directly
|
|
Chris PeBenito |
e88003 |
## by policy writers.
|
|
Chris PeBenito |
414e41 |
##
|
|
Chris PeBenito |
414e41 |
## </desc>
|
|
Chris PeBenito |
414e41 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
414e41 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
414e41 |
## is the prefix for user_t).
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
451c1e |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
451c1e |
## is the prefix for user_t).
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
451c1e |
## The type of the process performing this action.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
b2b38c |
#
|
|
Chris PeBenito |
199895 |
template(`gpg_per_userdomain_template',`
|
|
Chris PeBenito |
12ae75 |
gen_require(`
|
|
Chris PeBenito |
12ae75 |
type gpg_exec_t, gpg_helper_exec_t;
|
|
Chris PeBenito |
12ae75 |
type gpg_agent_exec_t, pinentry_exec_t;
|
|
Chris PeBenito |
12ae75 |
')
|
|
Chris PeBenito |
12ae75 |
|
|
Chris PeBenito |
0c73cd |
########################################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Declarations
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
type $1_gpg_t;
|
|
Chris PeBenito |
c9428d |
domain_type($1_gpg_t)
|
|
Chris PeBenito |
c9428d |
domain_entry_file($1_gpg_t,gpg_exec_t)
|
|
Chris PeBenito |
451c1e |
role $3 types $1_gpg_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
type $1_gpg_agent_t;
|
|
Chris PeBenito |
c9428d |
domain_type($1_gpg_agent_t)
|
|
Chris PeBenito |
c9428d |
domain_entry_file($1_gpg_agent_t,gpg_agent_exec_t)
|
|
Chris PeBenito |
451c1e |
role $3 types $1_gpg_agent_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
type $1_gpg_agent_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file($1_gpg_agent_tmp_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
6820a3 |
type $1_gpg_secret_t;
|
|
Chris PeBenito |
6820a3 |
userdom_home_file($1,$1_gpg_secret_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
type $1_gpg_helper_t;
|
|
Chris PeBenito |
c9428d |
domain_type($1_gpg_helper_t)
|
|
Chris PeBenito |
4483ee |
domain_entry_file($1_gpg_helper_t,gpg_helper_exec_t)
|
|
Chris PeBenito |
451c1e |
role $3 types $1_gpg_helper_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
type $1_gpg_pinentry_t;
|
|
Chris PeBenito |
c9428d |
domain_type($1_gpg_pinentry_t)
|
|
Chris PeBenito |
4483ee |
domain_entry_file($1_gpg_pinentry_t,pinentry_exec_t)
|
|
Chris PeBenito |
451c1e |
role $3 types $1_gpg_pinentry_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
########################################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# GPG local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
# transition from the userdomain to the derived domain
|
|
Chris PeBenito |
451c1e |
domain_auto_trans($2,gpg_exec_t,$1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
451c1e |
allow $2 $1_gpg_t:fd use;
|
|
Chris PeBenito |
451c1e |
allow $1_gpg_t $2:fd use;
|
|
Chris PeBenito |
451c1e |
allow $1_gpg_t $2:fifo_file rw_file_perms;
|
|
Chris PeBenito |
451c1e |
allow $1_gpg_t $2:process sigchld;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_t self:capability { ipc_lock setuid };
|
|
Chris PeBenito |
451c1e |
allow { $2 $1_gpg_t } $1_gpg_t:process signal;
|
|
Chris PeBenito |
0c73cd |
# setrlimit is for ulimit -c 0
|
|
Chris PeBenito |
cff75c |
allow $1_gpg_t self:process { setrlimit setcap setpgid };
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_t $1_gpg_secret_t:dir rw_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_t $1_gpg_secret_t:file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_t $1_gpg_secret_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_if($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_if($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_nodes($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_nodes($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports($1_gpg_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_all_nodes($1_gpg_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_all_nodes($1_gpg_t)
|
|
Chris PeBenito |
cff75c |
corenet_tcp_connect_all_ports($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Karl MacMillan |
f0c985 |
dev_read_rand($1_gpg_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_urand($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
ebdc3b |
domain_use_wide_inherit_fd($1_gpg_t)
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files($1_gpg_t)
|
|
Chris PeBenito |
c9428d |
files_read_usr_files($1_gpg_t)
|
|
Chris PeBenito |
ebdc3b |
files_dontaudit_search_var($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs($1_gpg_t)
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_localization($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
sysnet_read_config($1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
451c1e |
userdom_use_user_terminals($1,$1_gpg_t)
|
|
Chris PeBenito |
451c1e |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind($1_gpg_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
ab940a |
ifdef(`TODO',`
|
|
Chris PeBenito |
cff75c |
# Read content to encrypt/decrypt/sign
|
|
Chris PeBenito |
cff75c |
read_content($1_gpg_t, $1)
|
|
Chris PeBenito |
cff75c |
|
|
Chris PeBenito |
cff75c |
# Write content to encrypt/decrypt/sign
|
|
Chris PeBenito |
cff75c |
write_trusted($1_gpg_t, $1)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
ifdef(`gnome-pty-helper.te', `allow $1_gpg_t $1_gph_t:fd use;')
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
# allow ps to show gpg
|
|
Chris PeBenito |
0c73cd |
can_ps($1_t, $1_gpg_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
') dnl end TODO
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
########################################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# GPG helper local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
# for helper programs (which automatically fetch keys)
|
|
Chris PeBenito |
0c73cd |
# Note: this is only tested with the hkp interface. If you use eg the
|
|
Chris PeBenito |
0c73cd |
# mail interface you will likely need additional permissions.
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
d35c62 |
# communicate with the user
|
|
Chris PeBenito |
451c1e |
allow $1_gpg_helper_t $2:fd use;
|
|
Chris PeBenito |
451c1e |
allow $1_gpg_helper_t $2:fifo_file write;
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
0c73cd |
# transition from the gpg domain to the helper domain
|
|
Chris PeBenito |
d35c62 |
domain_auto_trans($1_gpg_t,gpg_helper_exec_t,$1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_t $1_gpg_helper_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_helper_t $1_gpg_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_helper_t $1_gpg_t:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_helper_t $1_gpg_t:process sigchld;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_helper_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_helper_t self:tcp_socket { connect connected_socket_perms };
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_helper_t self:udp_socket { connect connected_socket_perms };
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_helper_t $1_gpg_secret_t:file read;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_if($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_if($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_nodes($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_nodes($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports($1_gpg_helper_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_all_nodes($1_gpg_helper_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_all_nodes($1_gpg_helper_t)
|
|
Chris PeBenito |
cff75c |
corenet_tcp_connect_all_ports($1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Karl MacMillan |
f0c985 |
dev_read_urand($1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files($1_gpg_helper_t)
|
|
Chris PeBenito |
0c73cd |
# for nscd
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_var($1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so($1_gpg_helper_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs($1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
sysnet_read_config($1_gpg_helper_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
d35c62 |
fs_dontaudit_rw_nfs_files($1_gpg_helper_t)
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
d35c62 |
fs_dontaudit_rw_cifs_files($1_gpg_helper_t)
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
d35c62 |
ifdef(`TODO',`
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cff75c |
ifdef(`xdm.te',`
|
|
Chris PeBenito |
cff75c |
can_pipe_xdm($1_gpg_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
') dnl end TODO
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
########################################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# GPG agent local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
# rlimit: gpg-agent wants to prevent coredumps
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t self:process setrlimit;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_agent_t self:unix_stream_socket create_stream_socket_perms ;
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_agent_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
ebdc3b |
# read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d )
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_agent_t $1_gpg_secret_t:dir create_dir_perms;
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_agent_t $1_gpg_secret_t:file create_file_perms;
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_agent_t $1_gpg_secret_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
# allow gpg to connect to the gpg agent
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_t $1_gpg_agent_tmp_t:dir search;
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_t $1_gpg_agent_tmp_t:sock_file write;
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_t $1_gpg_agent_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
# Allow the user shell to signal the gpg-agent program.
|
|
Chris PeBenito |
451c1e |
allow $2 $1_gpg_agent_t:process { signal sigkill };
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
451c1e |
allow $2 $1_gpg_agent_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_gpg_agent_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_gpg_agent_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
9d5949 |
files_filetrans_tmp($1_gpg_agent_t, $1_gpg_agent_tmp_t, { file sock_file dir })
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
ebdc3b |
corecmd_search_bin($1_gpg_agent_t)
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
d35c62 |
# Transition from the user domain to the derived domain.
|
|
Chris PeBenito |
451c1e |
domain_auto_trans($2, gpg_agent_exec_t, $1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
c9428d |
domain_use_wide_inherit_fd($1_gpg_agent_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so($1_gpg_agent_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs($1_gpg_agent_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_localization($1_gpg_agent_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
451c1e |
# Write to the user domain tty.
|
|
Chris PeBenito |
451c1e |
userdom_use_user_terminals($1,$1_gpg_agent_t)
|
|
Chris PeBenito |
451c1e |
|
|
Chris PeBenito |
d35c62 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
d35c62 |
fs_manage_nfs_dirs($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
fs_manage_nfs_files($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
fs_manage_nfs_symlinks($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
')
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
d35c62 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
d35c62 |
fs_manage_cifs_dirs($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
fs_manage_cifs_files($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
fs_manage_cifs_symlinks($1_gpg_agent_t)
|
|
Chris PeBenito |
d35c62 |
')
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
0c73cd |
ifdef(`TODO',`
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# allow ps to show gpg-agent
|
|
Chris PeBenito |
0c73cd |
can_ps($1_t, $1_gpg_agent_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t proc_t:dir search;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t proc_t:lnk_file read;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d )
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t { home_root_t $1_home_dir_t }:dir search;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
') dnl endif TODO
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Pinentry local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# we need to allow gpg-agent to call pinentry so it can get the passphrase
|
|
Chris PeBenito |
0c73cd |
# from the user.
|
|
Chris PeBenito |
d35c62 |
domain_auto_trans($1_gpg_agent_t,pinentry_exec_t,$1_gpg_pinentry_t)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t $1_gpg_agent_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t $1_gpg_pinentry_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t $1_gpg_pinentry_t:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_agent_t $1_gpg_pinentry_t:process sigchld;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t self:unix_stream_socket { connect create getattr read shutdown write };
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_pinentry_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# read /proc/meminfo
|
|
Chris PeBenito |
0c73cd |
kernel_read_system_state($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_read_usr_files($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
# read /etc/X11/qtrc
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so($1_gpg_pinentry_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_fonts($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_localization($1_gpg_pinentry_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
ebdc3b |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
ebdc3b |
fs_read_nfs_files($1_gpg_pinentry_t)
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
ebdc3b |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
ebdc3b |
fs_read_cifs_files($1_gpg_pinentry_t)
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
ifdef(`TODO',`
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t xdm_xserver_tmp_t:dir search;
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t xdm_xserver_tmp_t:sock_file { read write };
|
|
Chris PeBenito |
ebdc3b |
allow $1_gpg_pinentry_t xdm_xserver_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t { tmp_t home_root_t }:dir { getattr search };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# for .Xauthority
|
|
Chris PeBenito |
0c73cd |
allow $1_gpg_pinentry_t $1_home_dir_t:dir { getattr search };
|
|
Chris PeBenito |
cc41a9 |
allow $1_gpg_pinentry_t $1_home_t:file r_file_perms;
|
|
Chris PeBenito |
0c73cd |
# wants to put some lock files into the user home dir, seems to work fine without
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_pinentry_t $1_home_t:dir { read write };
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_pinentry_t $1_home_t:file write;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
ebdc3b |
dontaudit $1_gpg_pinentry_t nfs_t:dir write;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_pinentry_t nfs_t:file write;
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
ebdc3b |
dontaudit $1_gpg_pinentry_t cifs_t:dir write;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_pinentry_t cifs_t:file write;
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_gpg_pinentry_t { sysctl_t sysctl_kernel_t }:dir { getattr search };
|
|
Chris PeBenito |
0c73cd |
') dnl end TODO
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
004db9 |
|