|
Chris PeBenito |
a3b0dc |
policy_module(gpg, 2.3.1)
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
b2b38c |
########################################
|
|
Chris PeBenito |
b2b38c |
#
|
|
Chris PeBenito |
b2b38c |
# Declarations
|
|
Chris PeBenito |
b2b38c |
#
|
|
Dan Walsh |
3eaa99 |
attribute gpgdomain;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
a42ce9 |
## <desc>
|
|
Chris PeBenito |
a42ce9 |
##
|
|
Chris PeBenito |
a42ce9 |
## Allow usage of the gpg-agent --write-env-file option.
|
|
Chris PeBenito |
a42ce9 |
## This also allows gpg-agent to manage user files.
|
|
Chris PeBenito |
a42ce9 |
##
|
|
Chris PeBenito |
a42ce9 |
## </desc>
|
|
Chris PeBenito |
a42ce9 |
gen_tunable(gpg_agent_env_file, false)
|
|
Chris PeBenito |
a42ce9 |
|
|
Dan Walsh |
3eaa99 |
## <desc>
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## Allow gpg web domain to modify public files
|
|
Dan Walsh |
3eaa99 |
## used for public file transfer services.
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## </desc>
|
|
Dan Walsh |
3eaa99 |
gen_tunable(gpg_web_anon_write, false)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type gpg_t, gpgdomain;
|
|
Chris PeBenito |
b2b38c |
type gpg_exec_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_t alias { user_gpg_t staff_gpg_t sysadm_gpg_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_t alias { auditadm_gpg_t secadm_gpg_t };
|
|
Chris PeBenito |
296273 |
application_domain(gpg_t, gpg_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(gpg_t)
|
|
Chris PeBenito |
857d37 |
role system_r types gpg_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
296273 |
type gpg_agent_t;
|
|
Chris PeBenito |
b2b38c |
type gpg_agent_exec_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_agent_t alias { user_gpg_agent_t staff_gpg_agent_t sysadm_gpg_agent_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_agent_t alias { auditadm_gpg_agent_t secadm_gpg_agent_t };
|
|
Chris PeBenito |
296273 |
application_domain(gpg_agent_t, gpg_agent_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type gpg_agent_tmp_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_agent_tmp_t alias { user_gpg_agent_tmp_t staff_gpg_agent_tmp_t sysadm_gpg_agent_tmp_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_agent_tmp_t alias { auditadm_gpg_agent_tmp_t secadm_gpg_agent_tmp_t };
|
|
Chris PeBenito |
296273 |
files_tmp_file(gpg_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(gpg_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type gpg_secret_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_secret_t alias { user_gpg_secret_t staff_gpg_secret_t sysadm_gpg_secret_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_secret_t alias { auditadm_gpg_secret_t secadm_gpg_secret_t };
|
|
Chris PeBenito |
296273 |
userdom_user_home_content(gpg_secret_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type gpg_helper_t;
|
|
Chris PeBenito |
296273 |
type gpg_helper_exec_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_helper_t alias { user_gpg_helper_t staff_gpg_helper_t sysadm_gpg_helper_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_helper_t alias { auditadm_gpg_helper_t secadm_gpg_helper_t };
|
|
Chris PeBenito |
296273 |
application_domain(gpg_helper_t, gpg_helper_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(gpg_helper_t)
|
|
Chris PeBenito |
857d37 |
role system_r types gpg_helper_t;
|
|
Chris PeBenito |
b2b38c |
|
|
Chris PeBenito |
296273 |
type gpg_pinentry_t;
|
|
Chris PeBenito |
b2b38c |
type pinentry_exec_t;
|
|
Chris PeBenito |
296273 |
typealias gpg_pinentry_t alias { user_gpg_pinentry_t staff_gpg_pinentry_t sysadm_gpg_pinentry_t };
|
|
Chris PeBenito |
296273 |
typealias gpg_pinentry_t alias { auditadm_gpg_pinentry_t secadm_gpg_pinentry_t };
|
|
Chris PeBenito |
296273 |
application_domain(gpg_pinentry_t, pinentry_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
857d37 |
type gpg_pinentry_tmp_t;
|
|
Chris PeBenito |
857d37 |
files_tmp_file(gpg_pinentry_tmp_t)
|
|
Chris PeBenito |
857d37 |
ubac_constrained(gpg_pinentry_tmp_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
type gpg_pinentry_tmpfs_t;
|
|
Chris PeBenito |
857d37 |
files_tmpfs_file(gpg_pinentry_tmpfs_t)
|
|
Chris PeBenito |
857d37 |
ubac_constrained(gpg_pinentry_tmpfs_t)
|
|
Chris PeBenito |
857d37 |
|
|
Dan Walsh |
3eaa99 |
type gpg_web_t;
|
|
Dan Walsh |
3eaa99 |
domain_type(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
gpg_entry_type(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
role system_r types gpg_web_t;
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# GPG local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Dan Walsh |
3eaa99 |
allow gpgdomain self:capability { ipc_lock setuid };
|
|
Dan Walsh |
3eaa99 |
allow gpgdomain self:process { getsched setsched };
|
|
Dan Walsh |
3eaa99 |
#at setrlimit is for ulimit -c 0
|
|
Dan Walsh |
3eaa99 |
allow gpgdomain self:process { signal signull setrlimit getcap setcap setpgid };
|
|
Chris PeBenito |
296273 |
|
|
Dan Walsh |
3eaa99 |
allow gpgdomain self:fifo_file rw_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
allow gpgdomain self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
e4f73a |
manage_dirs_pattern(gpg_t, gpg_agent_tmp_t, gpg_agent_tmp_t)
|
|
Chris PeBenito |
e4f73a |
manage_files_pattern(gpg_t, gpg_agent_tmp_t, gpg_agent_tmp_t)
|
|
Chris PeBenito |
e4f73a |
files_tmp_filetrans(gpg_t, gpg_agent_tmp_t, { dir file })
|
|
Chris PeBenito |
e4f73a |
|
|
Chris PeBenito |
857d37 |
domtrans_pattern(gpg_t, gpg_agent_exec_t, gpg_agent_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
296273 |
# transition from the gpg domain to the helper domain
|
|
Chris PeBenito |
296273 |
domtrans_pattern(gpg_t, gpg_helper_exec_t, gpg_helper_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow gpg_t gpg_secret_t:dir create_dir_perms;
|
|
Chris PeBenito |
296273 |
manage_files_pattern(gpg_t, gpg_secret_t, gpg_secret_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(gpg_t, gpg_secret_t, gpg_secret_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans(gpg_t, gpg_secret_t, dir)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
e4f73a |
kernel_read_sysctl(gpg_t)
|
|
Chris PeBenito |
e4f73a |
|
|
Chris PeBenito |
857d37 |
corecmd_exec_shell(gpg_t)
|
|
Chris PeBenito |
857d37 |
corecmd_exec_bin(gpg_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_unlabeled(gpg_t)
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_netlabel(gpg_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(gpg_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(gpg_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(gpg_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(gpg_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_all_ports(gpg_t)
|
|
Chris PeBenito |
296273 |
corenet_udp_sendrecv_all_ports(gpg_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_connect_all_ports(gpg_t)
|
|
Chris PeBenito |
296273 |
corenet_sendrecv_all_client_packets(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dev_read_rand(gpg_t)
|
|
Chris PeBenito |
296273 |
dev_read_urand(gpg_t)
|
|
Chris PeBenito |
ca7fa5 |
dev_read_generic_usb_dev(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
fs_getattr_xattr_fs(gpg_t)
|
|
Chris PeBenito |
857d37 |
fs_list_inotifyfs(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(gpg_t)
|
|
Chris PeBenito |
296273 |
files_read_usr_files(gpg_t)
|
|
Chris PeBenito |
296273 |
files_dontaudit_search_var(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
e4f73a |
auth_use_nsswitch(gpg_t)
|
|
Chris PeBenito |
e4f73a |
|
|
Chris PeBenito |
296273 |
logging_send_syslog_msg(gpg_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
36ded4 |
miscfiles_read_localization(gpg_t)
|
|
Chris PeBenito |
36ded4 |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(gpg_t)
|
|
Chris PeBenito |
36ded4 |
# sign/encrypt user files
|
|
Chris PeBenito |
36ded4 |
userdom_manage_user_tmp_files(gpg_t)
|
|
Chris PeBenito |
36ded4 |
userdom_manage_user_home_content_files(gpg_t)
|
|
Chris PeBenito |
857d37 |
userdom_user_home_dir_filetrans_user_home_content(gpg_t, file)
|
|
Dan Walsh |
3eaa99 |
userdom_stream_connect(gpg_t)
|
|
Chris PeBenito |
36ded4 |
|
|
Chris PeBenito |
36ded4 |
mta_write_config(gpg_t)
|
|
Chris PeBenito |
36ded4 |
|
|
Chris PeBenito |
36ded4 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
36ded4 |
fs_manage_nfs_dirs(gpg_t)
|
|
Chris PeBenito |
36ded4 |
fs_manage_nfs_files(gpg_t)
|
|
Chris PeBenito |
36ded4 |
')
|
|
Chris PeBenito |
36ded4 |
|
|
Chris PeBenito |
36ded4 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
36ded4 |
fs_manage_cifs_dirs(gpg_t)
|
|
Chris PeBenito |
36ded4 |
fs_manage_cifs_files(gpg_t)
|
|
Chris PeBenito |
36ded4 |
')
|
|
Chris PeBenito |
36ded4 |
|
|
Chris PeBenito |
36ded4 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
gnome_read_config(gpg_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
857d37 |
mozilla_read_user_home_files(gpg_t)
|
|
Chris PeBenito |
857d37 |
mozilla_write_user_home_files(gpg_t)
|
|
Chris PeBenito |
857d37 |
')
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
optional_policy(`
|
|
Chris PeBenito |
36ded4 |
xserver_use_xdm_fds(gpg_t)
|
|
Chris PeBenito |
36ded4 |
xserver_rw_xdm_pipes(gpg_t)
|
|
Chris PeBenito |
36ded4 |
')
|
|
Chris PeBenito |
36ded4 |
|
|
Dan Walsh |
3eaa99 |
#optional_policy(`
|
|
Dan Walsh |
3eaa99 |
# cron_system_entry(gpg_t, gpg_exec_t)
|
|
Dan Walsh |
3eaa99 |
# cron_read_system_job_tmp_files(gpg_t)
|
|
Dan Walsh |
3eaa99 |
#')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# GPG helper local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
e4f73a |
allow gpg_helper_t self:process { getsched setsched };
|
|
Chris PeBenito |
e4f73a |
|
|
Chris PeBenito |
296273 |
# for helper programs (which automatically fetch keys)
|
|
Chris PeBenito |
857d37 |
# Note: this is only tested with the hkp interface. If you use eg the
|
|
Chris PeBenito |
296273 |
# mail interface you will likely need additional permissions.
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow gpg_helper_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
allow gpg_helper_t self:tcp_socket { connect connected_socket_perms };
|
|
Chris PeBenito |
296273 |
allow gpg_helper_t self:udp_socket { connect connected_socket_perms };
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit gpg_helper_t gpg_secret_t:file read;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_unlabeled(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_netlabel(gpg_helper_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(gpg_helper_t)
|
|
Chris PeBenito |
668b30 |
corenet_raw_sendrecv_generic_if(gpg_helper_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(gpg_helper_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(gpg_helper_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(gpg_helper_t)
|
|
Chris PeBenito |
c12621 |
corenet_raw_sendrecv_generic_node(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_all_ports(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
corenet_udp_sendrecv_all_ports(gpg_helper_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_bind_generic_node(gpg_helper_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_bind_generic_node(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_connect_all_ports(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
e4f73a |
auth_use_nsswitch(gpg_helper_t)
|
|
Chris PeBenito |
e4f73a |
|
|
Chris PeBenito |
e4f73a |
userdom_use_user_terminals(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
36ded4 |
fs_dontaudit_rw_nfs_files(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
36ded4 |
fs_dontaudit_rw_cifs_files(gpg_helper_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# GPG agent local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Dan Walsh |
3eaa99 |
domtrans_pattern(gpg_t, gpg_agent_exec_t, gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# rlimit: gpg-agent wants to prevent coredumps
|
|
Chris PeBenito |
296273 |
allow gpg_agent_t self:process setrlimit;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow gpg_agent_t self:unix_stream_socket create_stream_socket_perms ;
|
|
Chris PeBenito |
296273 |
allow gpg_agent_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d )
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Allow the gpg-agent to manage its tmp files (socket)
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(gpg_agent_t, gpg_agent_tmp_t, gpg_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(gpg_agent_t, gpg_agent_tmp_t, gpg_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern(gpg_agent_t, gpg_agent_tmp_t, gpg_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans(gpg_agent_t, gpg_agent_tmp_t, { file sock_file dir })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# allow gpg to connect to the gpg agent
|
|
Chris PeBenito |
296273 |
stream_connect_pattern(gpg_t, gpg_agent_tmp_t, gpg_agent_tmp_t, gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
corecmd_read_bin_symlinks(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
corecmd_search_bin(gpg_agent_t)
|
|
Chris PeBenito |
857d37 |
corecmd_exec_shell(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
dev_read_urand(gpg_agent_t)
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
fs_dontaudit_list_inotifyfs(gpg_agent_t)
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Write to the user domain tty.
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
# read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d )
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
ifdef(`hide_broken_symptoms',`
|
|
Chris PeBenito |
a3b0dc |
userdom_dontaudit_read_user_tmp_files(gpg_agent_t)
|
|
Dan Walsh |
3eaa99 |
userdom_dontaudit_write_user_tmp_files(gpg_agent_t)
|
|
Chris PeBenito |
a3b0dc |
')
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
296273 |
tunable_policy(`gpg_agent_env_file',`
|
|
Chris PeBenito |
296273 |
# write ~/.gpg-agent-info or a similar to the users home dir
|
|
Chris PeBenito |
296273 |
# or subdir (gpg-agent --write-env-file option)
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans_user_home_content(gpg_agent_t, file)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_dirs(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_files(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_dirs(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_files(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_symlinks(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_dirs(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_files(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_symlinks(gpg_agent_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
optional_policy(`
|
|
Chris PeBenito |
a3b0dc |
mozilla_dontaudit_rw_user_home_files(gpg_agent_t)
|
|
Chris PeBenito |
a3b0dc |
')
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
296273 |
##############################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# Pinentry local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:process { getcap getsched setsched signal };
|
|
Chris PeBenito |
296273 |
allow gpg_pinentry_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:netlink_route_socket create_netlink_socket_perms;
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:shm create_shm_perms;
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
857d37 |
allow gpg_pinentry_t self:unix_stream_socket { connect create getattr read shutdown write };
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
857d37 |
can_exec(gpg_pinentry_t, pinentry_exec_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
# we need to allow gpg-agent to call pinentry so it can get the passphrase
|
|
Chris PeBenito |
296273 |
# from the user.
|
|
Chris PeBenito |
296273 |
domtrans_pattern(gpg_agent_t, pinentry_exec_t, gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
857d37 |
manage_sock_files_pattern(gpg_pinentry_t, gpg_pinentry_tmp_t, gpg_pinentry_tmp_t)
|
|
Chris PeBenito |
857d37 |
userdom_user_tmp_filetrans(gpg_pinentry_t, gpg_pinentry_tmp_t, sock_file)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
manage_dirs_pattern(gpg_pinentry_t, gpg_pinentry_tmpfs_t, gpg_pinentry_tmpfs_t)
|
|
Chris PeBenito |
857d37 |
manage_files_pattern(gpg_pinentry_t, gpg_pinentry_tmpfs_t, gpg_pinentry_tmpfs_t)
|
|
Chris PeBenito |
857d37 |
fs_tmpfs_filetrans(gpg_pinentry_t, gpg_pinentry_tmpfs_t, { file dir })
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
296273 |
# read /proc/meminfo
|
|
Chris PeBenito |
296273 |
kernel_read_system_state(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
857d37 |
corecmd_exec_bin(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
corenet_all_recvfrom_netlabel(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_all_recvfrom_unlabeled(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_sendrecv_pulseaudio_client_packets(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_tcp_bind_generic_node(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_tcp_connect_pulseaudio_port(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_tcp_sendrecv_generic_if(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_tcp_sendrecv_generic_node(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
corenet_tcp_sendrecv_generic_port(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
dev_read_urand(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
dev_read_rand(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
296273 |
files_read_usr_files(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
# read /etc/X11/qtrc
|
|
Chris PeBenito |
296273 |
files_read_etc_files(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
a3b0dc |
fs_dontaudit_list_inotifyfs(gpg_pinentry_t)
|
|
Chris PeBenito |
a3b0dc |
fs_getattr_tmpfs(gpg_pinentry_t)
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
a3b0dc |
auth_use_nsswitch(gpg_pinentry_t)
|
|
Chris PeBenito |
a3b0dc |
|
|
Chris PeBenito |
857d37 |
logging_send_syslog_msg(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_fonts(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# for .Xauthority
|
|
Chris PeBenito |
296273 |
userdom_read_user_home_content_files(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
userdom_read_user_tmpfs_files(gpg_pinentry_t)
|
|
Dan Walsh |
3eaa99 |
# Bug: user pulseaudio files need open,read and unlink:
|
|
Dan Walsh |
3eaa99 |
allow gpg_pinentry_t user_tmpfs_t:file unlink;
|
|
Dan Walsh |
3eaa99 |
userdom_signull_unpriv_users(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_read_nfs_files(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_read_cifs_files(gpg_pinentry_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
857d37 |
dbus_session_bus_client(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
dbus_system_bus_client(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
')
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
gnome_write_generic_cache_files(gpg_pinentry_t)
|
|
Dan Walsh |
3eaa99 |
gnome_read_generic_cache_files(gpg_pinentry_t)
|
|
Dan Walsh |
3eaa99 |
gnome_read_gconf_home_files(gpg_pinentry_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
857d37 |
pulseaudio_exec(gpg_pinentry_t)
|
|
Chris PeBenito |
a3b0dc |
pulseaudio_rw_home_files(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
pulseaudio_setattr_home_dir(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
pulseaudio_stream_connect(gpg_pinentry_t)
|
|
Chris PeBenito |
a3b0dc |
pulseaudio_signull(gpg_pinentry_t)
|
|
Chris PeBenito |
857d37 |
')
|
|
Chris PeBenito |
857d37 |
|
|
Chris PeBenito |
857d37 |
optional_policy(`
|
|
Chris PeBenito |
857d37 |
xserver_user_x_domain_template(gpg_pinentry, gpg_pinentry_t, gpg_pinentry_tmpfs_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#############################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# gpg web local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow gpg_web_t self:process setrlimit;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dev_read_rand(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
dev_read_urand(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
can_exec(gpg_web_t, gpg_exec_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_usr_files(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
miscfiles_read_localization(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
apache_dontaudit_rw_tmp_files(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
apache_manage_sys_content_rw(gpg_web_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`gpg_web_anon_write',`
|
|
Dan Walsh |
3eaa99 |
miscfiles_manage_public_files(gpg_web_t)
|
|
Chris PeBenito |
296273 |
')
|