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 bbcd3c
##	The per role 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 885b83
##	<summary>
Chris PeBenito 414e41
##	The prefix of the user domain (e.g., user
Chris PeBenito 414e41
##	is the prefix for user_t).
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 414e41
## </param>
Chris PeBenito fe2102
## <param name="userdomain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito fe2102
##	The user domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 451c1e
## </param>
Chris PeBenito fe2102
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito fe2102
##	The role associated with the user.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 451c1e
## </param>
Chris PeBenito b2b38c
#
Chris PeBenito bbcd3c
template(`gpg_per_role_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 103fe2
	userdom_user_home_content($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
	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 c0868a
	allow $1_gpg_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito cc41a9
	allow $1_gpg_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito b2b38c
Chris PeBenito c0868a
	# transition from the gpg domain to the helper domain
Chris PeBenito c0868a
	domtrans_pattern($1_gpg_t,gpg_helper_exec_t,$1_gpg_helper_t)
Chris PeBenito c0868a
Chris PeBenito c0868a
	manage_files_pattern($1_gpg_t,$1_gpg_secret_t,$1_gpg_secret_t)
Chris PeBenito c0868a
	manage_lnk_files_pattern($1_gpg_t,$1_gpg_secret_t,$1_gpg_secret_t)
Chris PeBenito 4832f0
	allow $1_gpg_t $1_gpg_secret_t:dir create_dir_perms;
Chris PeBenito 4832f0
 	userdom_user_home_dir_filetrans($1, $1_gpg_t, $1_gpg_secret_t, dir)
Chris PeBenito b2b38c
Chris PeBenito 1f6524
	# transition from the userdomain to the derived domain
Chris PeBenito c0868a
	domtrans_pattern($2,gpg_exec_t,$1_gpg_t)
Chris PeBenito 1f6524
Chris PeBenito 1f6524
	# allow ps to show gpg
Chris PeBenito c0868a
	ps_process_pattern($2,$1_gpg_t)
Chris PeBenito 1f6524
Chris PeBenito c0d8c4
	corenet_non_ipsec_sendrecv($1_gpg_t)
Chris PeBenito 0fd9dc
	corenet_tcp_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_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 cff75c
	corenet_tcp_connect_all_ports($1_gpg_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_all_client_packets($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 15722e
	domain_use_interactive_fds($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 bb7170
	optional_policy(`
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 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 cc41a9
	allow $1_gpg_helper_t self:unix_stream_socket create_stream_socket_perms;
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 c0868a
	# communicate with the user 
Chris PeBenito c0868a
	allow $1_gpg_helper_t $2:fd use;
Chris PeBenito c0868a
	allow $1_gpg_helper_t $2:fifo_file write;
Chris PeBenito c0868a
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 1f6524
	optional_policy(`
Chris PeBenito 1f6524
		xserver_use_xdm_fds($1_gpg_t)
Chris PeBenito 1f6524
		xserver_rw_xdm_pipes($1_gpg_t)
Chris PeBenito 0c73cd
	')
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 c0868a
	allow $1_gpg_agent_t self:fifo_file rw_fifo_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 c0868a
	manage_dirs_pattern($1_gpg_agent_t,$1_gpg_secret_t,$1_gpg_secret_t)
Chris PeBenito c0868a
	manage_files_pattern($1_gpg_agent_t,$1_gpg_secret_t,$1_gpg_secret_t)
Chris PeBenito c0868a
	manage_lnk_files_pattern($1_gpg_agent_t,$1_gpg_secret_t,$1_gpg_secret_t)
Chris PeBenito ebdc3b
Chris PeBenito ebdc3b
	# allow gpg to connect to the gpg agent
Chris PeBenito c0868a
	stream_connect_pattern($1_gpg_t,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t,$1_gpg_agent_t)
Chris PeBenito ebdc3b
Chris PeBenito 1f6524
	# allow ps to show gpg-agent
Chris PeBenito c0868a
	ps_process_pattern($2,$1_gpg_agent_t)
Chris PeBenito 1f6524
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 c0868a
	manage_dirs_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t)
Chris PeBenito c0868a
	manage_files_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t)
Chris PeBenito c0868a
	manage_sock_files_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t)
Chris PeBenito 103fe2
	files_tmp_filetrans($1_gpg_agent_t, $1_gpg_agent_tmp_t, { file sock_file dir })
Chris PeBenito 0c73cd
Chris PeBenito d35c62
	# Transition from the user domain to the derived domain.
Chris PeBenito c0868a
	domtrans_pattern($2, gpg_agent_exec_t, $1_gpg_agent_t)
Chris PeBenito 1f6524
Chris PeBenito 1f6524
	corecmd_search_bin($1_gpg_agent_t)
Chris PeBenito d35c62
Chris PeBenito 15722e
	domain_use_interactive_fds($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 1f6524
	# read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d )
Chris PeBenito 1f6524
	userdom_search_user_home_dirs($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
	##############################
Chris PeBenito 0c73cd
	#
Chris PeBenito 0c73cd
	# Pinentry local policy
Chris PeBenito 0c73cd
	#
Chris PeBenito 0c73cd
Chris PeBenito c0868a
	allow $1_gpg_pinentry_t self:unix_stream_socket { connect create getattr read shutdown write };
Chris PeBenito c0868a
	allow $1_gpg_pinentry_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito c0868a
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 c0868a
	domtrans_pattern($1_gpg_agent_t,pinentry_exec_t,$1_gpg_pinentry_t)
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 1f6524
	# for .Xauthority
Chris PeBenito 1f6524
	userdom_read_user_home_content_files($1,$1_gpg_pinentry_t)
Chris PeBenito 1f6524
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 1f6524
	optional_policy(`
Chris PeBenito 1f6524
		xserver_stream_connect_xdm_xserver($1_gpg_pinentry_t)
Chris PeBenito 0c73cd
	')
Chris PeBenito 0c73cd
Chris PeBenito 1f6524
	ifdef(`TODO',`
Chris PeBenito 1f6524
	allow $1_gpg_pinentry_t tmp_t:dir { getattr search };
Chris PeBenito 0c73cd
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
Chris PeBenito 185272
########################################
Chris PeBenito 185272
## <summary>
Chris PeBenito 185272
##      Transition to a user gpg domain.
Chris PeBenito 185272
## </summary>
Chris PeBenito 185272
## <desc>
Chris PeBenito 185272
##      

Chris PeBenito 185272
##      Transition to a user gpg domain.
Chris PeBenito 185272
##      

Chris PeBenito 185272
##      

Chris PeBenito 185272
##      This is a templated interface, and should only
Chris PeBenito 185272
##      be called from a per-userdomain template.
Chris PeBenito 185272
##      

Chris PeBenito 185272
## </desc>
Chris PeBenito 185272
## <param name="userdomain_prefix">
Chris PeBenito 185272
##	<summary>
Chris PeBenito 185272
##      The prefix of the user domain (e.g., user
Chris PeBenito 185272
##      is the prefix for user_t).
Chris PeBenito 185272
##	</summary>
Chris PeBenito 185272
## </param>
Chris PeBenito 185272
## <param name="domain">
Chris PeBenito 185272
##	<summary>
Chris PeBenito 185272
##      Domain allowed access.
Chris PeBenito 185272
##	</summary>
Chris PeBenito 185272
## </param>
Chris PeBenito 185272
#
Chris PeBenito 185272
template(`gpg_domtrans_user_gpg',`
Chris PeBenito 185272
	gen_require(`
Chris PeBenito 185272
		type $1_gpg_t, gpg_exec_t;
Chris PeBenito 185272
	')
Chris PeBenito 185272
Chris PeBenito c0868a
	domtrans_pattern($2, gpg_exec_t, $1_gpg_t)
Chris PeBenito 185272
')
Chris PeBenito 185272
Chris PeBenito edf241
########################################
Chris PeBenito edf241
## <summary>
Chris PeBenito edf241
##      Send generic signals to user gpg processes.
Chris PeBenito edf241
## </summary>
Chris PeBenito edf241
## <desc>
Chris PeBenito edf241
##      

Chris PeBenito edf241
##      This is a templated interface, and should only
Chris PeBenito edf241
##      be called from a per-userdomain template.
Chris PeBenito edf241
##      

Chris PeBenito edf241
## </desc>
Chris PeBenito edf241
## <param name="userdomain_prefix">
Chris PeBenito edf241
##	<summary>
Chris PeBenito edf241
##      The prefix of the user domain (e.g., user
Chris PeBenito edf241
##      is the prefix for user_t).
Chris PeBenito edf241
##	</summary>
Chris PeBenito edf241
## </param>
Chris PeBenito edf241
## <param name="domain">
Chris PeBenito edf241
##	<summary>
Chris PeBenito edf241
##      Domain allowed access.
Chris PeBenito edf241
##	</summary>
Chris PeBenito edf241
## </param>
Chris PeBenito edf241
#
Chris PeBenito edf241
template(`gpg_signal_user_gpg',`
Chris PeBenito edf241
	gen_require(`
Chris PeBenito edf241
		type $1_gpg_t;
Chris PeBenito edf241
	')
Chris PeBenito edf241
Chris PeBenito edf241
	allow $2 $1_gpg_t:process signal;
Chris PeBenito edf241
')