All pastes #746645 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-23 11:45 UTC
rendered paste body
#######################################
## <summary>
##	Template for creating XChat connections to
##	a user DBUS.
##  Connect, send message and acquire service.
## </summary>
## <param name="user_prefix">
##	<summary>
##	The prefix of the domain (e.g., user
##	is the prefix for user_t).
##	</summary>
## </param>
## <param name="domain_prefix">
##	<summary>
##	The prefix of the domain (e.g., user
##	is the prefix for user_t).
##	</summary>
## </param>
## <param name="domain">
##	<summary>
##	The type of the domain.
##	</summary>
## </param>
#
template(`xchat_dbus_user_bus_client_template',`
	gen_require(`
		type $1_dbusd_t;
		class dbus send_msg;
		# XChat specifics
		class dbus acquire_svc;
	')

	type $2_dbusd_$1_t;
	type_change $3 $1_dbusd_t:dbus $2_dbusd_$1_t;

	# SE-DBus specific permissions
	allow $2_dbusd_$1_t { $1_dbusd_t self }:dbus send_msg;

	# For connecting to the bus
	allow $3 $1_dbusd_t:unix_stream_socket connectto;

	# XChat specifics
	allow $3 $1_dbusd_t:dbus send_msg;	
	allow $3 $1_dbusd_t:dbus acquire_svc;
')