Chris PeBenito 002190
## <summary>GNU network object model environment (GNOME)</summary>
Chris PeBenito 002190
Chris PeBenito 296273
############################################################
Chris PeBenito 002190
## <summary>
Chris PeBenito 296273
##	Role access for gnome
Chris PeBenito 002190
## </summary>
Chris PeBenito 296273
## <param name="role">
Chris PeBenito 002190
##	<summary>
Chris PeBenito 296273
##	Role allowed access
Chris PeBenito 002190
##	</summary>
Chris PeBenito 002190
## </param>
Chris PeBenito 296273
## <param name="domain">
Chris PeBenito 002190
##	<summary>
Chris PeBenito 296273
##	User domain for the role
Chris PeBenito 002190
##	</summary>
Chris PeBenito 002190
## </param>
Chris PeBenito 002190
#
Chris PeBenito 296273
interface(`gnome_role',`
Chris PeBenito 002190
	gen_require(`
Chris PeBenito 296273
		type gconfd_t, gconfd_exec_t;
Chris PeBenito 296273
		type gconf_tmp_t;
Chris PeBenito 002190
	')
Chris PeBenito 002190
Chris PeBenito 296273
	role $1 types gconfd_t;
Chris PeBenito 002190
Chris PeBenito 296273
	domain_auto_trans($2, gconfd_exec_t, gconfd_t)
Chris PeBenito 296273
	allow gconfd_t $2:fd use;
Chris PeBenito 296273
	allow gconfd_t $2:fifo_file write;
Chris PeBenito 296273
	allow gconfd_t $2:unix_stream_socket connectto;
Chris PeBenito 6b19be
Chris PeBenito 296273
	ps_process_pattern($2, gconfd_t)
Chris PeBenito 002190
Chris PeBenito 296273
	#gnome_stream_connect_gconf_template($1, $2)
Chris PeBenito 296273
	read_files_pattern($2, gconf_tmp_t, gconf_tmp_t)
Chris PeBenito 296273
	allow $2 gconfd_t:unix_stream_socket connectto;
Chris PeBenito 002190
')
Chris PeBenito 2a9837
Chris PeBenito 002190
########################################
Chris PeBenito 002190
## <summary>
Chris PeBenito ab8f91
##	Execute gconf programs in
Chris PeBenito ab8f91
##	in the caller domain.
Chris PeBenito ab8f91
## </summary>
Chris PeBenito ab8f91
## <param name="domain">
Chris PeBenito ab8f91
##	<summary>
Chris PeBenito ab8f91
##	Domain allowed access.
Chris PeBenito ab8f91
##	</summary>
Chris PeBenito ab8f91
## </param>
Chris PeBenito ab8f91
#
Chris PeBenito ab8f91
interface(`gnome_exec_gconf',`
Chris PeBenito ab8f91
	gen_require(`
Chris PeBenito ab8f91
		type gconfd_exec_t;
Chris PeBenito ab8f91
	')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
	can_exec($1, gconfd_exec_t)
Chris PeBenito ab8f91
')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
########################################
Chris PeBenito ab8f91
## <summary>
Chris PeBenito ab8f91
##	Read gconf config files.
Chris PeBenito ab8f91
## </summary>
Chris PeBenito ab8f91
## <param name="user_domain">
Chris PeBenito ab8f91
##	<summary>
Chris PeBenito ab8f91
##	Domain allowed access.
Chris PeBenito ab8f91
##	</summary>
Chris PeBenito ab8f91
## </param>
Chris PeBenito ab8f91
#
Chris PeBenito ab8f91
template(`gnome_read_gconf_config',`
Chris PeBenito ab8f91
	gen_require(`
Chris PeBenito ab8f91
		type gconf_etc_t;
Chris PeBenito ab8f91
	')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
	allow $1 gconf_etc_t:dir list_dir_perms;
Chris PeBenito ab8f91
	read_files_pattern($1, gconf_etc_t, gconf_etc_t)
Chris PeBenito ab8f91
	files_search_etc($1)
Chris PeBenito ab8f91
')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
#######################################
Chris PeBenito ab8f91
## <summary>
Chris PeBenito ab8f91
##	Create, read, write, and delete gconf config files.
Chris PeBenito ab8f91
## </summary>
Chris PeBenito ab8f91
## <param name="domain">
Chris PeBenito ab8f91
##	<summary>
Chris PeBenito ab8f91
##	Domain allowed access.
Chris PeBenito ab8f91
##	</summary>
Chris PeBenito ab8f91
## </param>
Chris PeBenito ab8f91
#
Chris PeBenito ab8f91
interface(`gnome_manage_gconf_config',`
Chris PeBenito ab8f91
	gen_require(`
Chris PeBenito ab8f91
		type gconf_etc_t;
Chris PeBenito ab8f91
	')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
	manage_files_pattern($1, gconf_etc_t, gconf_etc_t)
Chris PeBenito ab8f91
	files_search_etc($1)
Chris PeBenito ab8f91
')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
########################################
Chris PeBenito ab8f91
## <summary>
Chris PeBenito 002190
##	gconf connection template.
Chris PeBenito 002190
## </summary>
Chris PeBenito 002190
## <param name="user_domain">
Chris PeBenito 002190
##	<summary>
Dominick Grift 03b866
##	Domain allowed access.
Chris PeBenito 002190
##	</summary>
Chris PeBenito 002190
## </param>
Chris PeBenito 002190
#
Chris PeBenito 296273
interface(`gnome_stream_connect_gconf',`
Chris PeBenito 002190
	gen_require(`
Chris PeBenito 296273
		type gconfd_t, gconf_tmp_t;
Chris PeBenito 002190
	')
Chris PeBenito 002190
Chris PeBenito 296273
	read_files_pattern($1, gconf_tmp_t, gconf_tmp_t)
Chris PeBenito 296273
	allow $1 gconfd_t:unix_stream_socket connectto;
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 296273
##	Run gconfd in gconfd domain.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain allowed access.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 296273
interface(`gnome_domtrans_gconfd',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 296273
		type gconfd_t, gconfd_exec_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 296273
	domtrans_pattern($1, gconfd_exec_t, gconfd_t)
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito ab8f91
##	Set attributes of Gnome config dirs.
Chris PeBenito ab8f91
## </summary>
Chris PeBenito ab8f91
## <param name="domain">
Chris PeBenito ab8f91
##	<summary>
Chris PeBenito ab8f91
##	Domain allowed access.
Chris PeBenito ab8f91
##	</summary>
Chris PeBenito ab8f91
## </param>
Chris PeBenito ab8f91
#
Chris PeBenito ab8f91
interface(`gnome_setattr_config_dirs',`
Chris PeBenito ab8f91
	gen_require(`
Chris PeBenito ab8f91
		type gnome_home_t;
Chris PeBenito ab8f91
	')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
	setattr_dirs_pattern($1, gnome_home_t, gnome_home_t)
Chris PeBenito ab8f91
	files_search_home($1)
Chris PeBenito ab8f91
')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
########################################
Chris PeBenito ab8f91
## <summary>
Chris PeBenito ab8f91
##	Read gnome homedir content (.config)
Chris PeBenito ab8f91
## </summary>
Chris PeBenito ab8f91
## <param name="user_domain">
Chris PeBenito ab8f91
##	<summary>
Chris PeBenito ab8f91
##	Domain allowed access.
Chris PeBenito ab8f91
##	</summary>
Chris PeBenito ab8f91
## </param>
Chris PeBenito ab8f91
#
Chris PeBenito ab8f91
template(`gnome_read_config',`
Chris PeBenito ab8f91
	gen_require(`
Chris PeBenito ab8f91
		type gnome_home_t;
Chris PeBenito ab8f91
	')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
	list_dirs_pattern($1, gnome_home_t, gnome_home_t)
Chris PeBenito ab8f91
	read_files_pattern($1, gnome_home_t, gnome_home_t)
Chris PeBenito ab8f91
	read_lnk_files_pattern($1, gnome_home_t, gnome_home_t)
Chris PeBenito ab8f91
')
Chris PeBenito ab8f91
Chris PeBenito ab8f91
########################################
Chris PeBenito ab8f91
## <summary>
Chris PeBenito 6b19be
##	manage gnome homedir content (.config)
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="user_domain">
Chris PeBenito 6b19be
##	<summary>
Dominick Grift 03b866
##	Domain allowed access.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 296273
interface(`gnome_manage_config',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 296273
		type gnome_home_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 296273
	allow $1 gnome_home_t:dir manage_dir_perms;
Chris PeBenito 296273
	allow $1 gnome_home_t:file manage_file_perms;
Chris PeBenito 296273
	userdom_search_user_home_dirs($1)
Chris PeBenito 002190
')