Chris PeBenito 9e90ce
## <summary>Policy framework for controlling privileges for system-wide services.</summary>
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Send and receive messages from
Chris PeBenito 9e90ce
##	policykit over dbus.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito 9e90ce
##	Domain allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_dbus_chat',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_t;
Chris PeBenito 9e90ce
		class dbus send_msg;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Dan Walsh 3eaa99
	ps_process_pattern(policykit_t, $1)
Dan Walsh 3eaa99
Chris PeBenito 9e90ce
	allow $1 policykit_t:dbus send_msg;
Chris PeBenito 9e90ce
	allow policykit_t $1:dbus send_msg;
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Dan Walsh 3eaa99
##	Send and receive messages from
Dan Walsh 3eaa99
##	policykit over dbus.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Domain allowed access.
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`policykit_dbus_chat_auth',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type policykit_auth_t;
Dan Walsh 3eaa99
		class dbus send_msg;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	ps_process_pattern(policykit_auth_t, $1)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 policykit_auth_t:dbus send_msg;
Dan Walsh 3eaa99
	allow policykit_auth_t $1:dbus send_msg;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Chris PeBenito 9e90ce
##	Execute a domain transition to run polkit_auth.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Domain allowed to transition.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_domtrans_auth',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_auth_t, policykit_auth_exec_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	domtrans_pattern($1, policykit_auth_exec_t, policykit_auth_t)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Execute a policy_auth in the policy_auth domain, and
Chris PeBenito 9e90ce
##	allow the specified role the policy_auth domain,
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Dominick Grift 288845
##	Domain allowed to transition.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
## <param name="role">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_run_auth',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_auth_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	policykit_domtrans_auth($1)
Chris PeBenito 9e90ce
	role $2 types policykit_auth_t;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 policykit_auth_t:process signal;
Dan Walsh 3eaa99
	ps_process_pattern(policykit_auth_t, $1)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Execute a domain transition to run polkit_grant.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Domain allowed to transition.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_domtrans_grant',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_grant_t, policykit_grant_exec_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	domtrans_pattern($1, policykit_grant_exec_t, policykit_grant_t)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Execute a policy_grant in the policy_grant domain, and
Chris PeBenito 9e90ce
##	allow the specified role the policy_grant domain,
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Dominick Grift 288845
##	Domain allowed to transition.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
## <param name="role">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
## <rolecap/>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_run_grant',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_grant_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	policykit_domtrans_grant($1)
Chris PeBenito 9e90ce
	role $2 types policykit_grant_t;
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	allow $1 policykit_grant_t:process signal;
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	ps_process_pattern(policykit_grant_t, $1)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	read policykit reload files
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito 9e90ce
##	Domain allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_read_reload',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_reload_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	files_search_var_lib($1)
Chris PeBenito 9e90ce
	read_files_pattern($1, policykit_reload_t, policykit_reload_t)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	rw policykit reload files
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito 9e90ce
##	Domain allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_rw_reload',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_reload_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	files_search_var_lib($1)
Chris PeBenito 9e90ce
	rw_files_pattern($1, policykit_reload_t, policykit_reload_t)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Execute a domain transition to run polkit_resolve.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Domain allowed to transition.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_domtrans_resolve',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_resolve_t, policykit_resolve_exec_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	domtrans_pattern($1, policykit_resolve_exec_t, policykit_resolve_t)
Chris PeBenito 9e90ce
LABBE Corentin 58cc99
	ps_process_pattern(policykit_resolve_t, $1)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	Search policykit lib directories.
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito 9e90ce
##	Domain allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_search_lib',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_var_lib_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	allow $1 policykit_var_lib_t:dir search_dir_perms;
Chris PeBenito 9e90ce
	files_search_var_lib($1)
Chris PeBenito 9e90ce
')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
########################################
Chris PeBenito 9e90ce
## <summary>
Chris PeBenito 9e90ce
##	read policykit lib files
Chris PeBenito 9e90ce
## </summary>
Chris PeBenito 9e90ce
## <param name="domain">
Chris PeBenito 9e90ce
##	<summary>
Chris PeBenito 9e90ce
##	Domain allowed access.
Chris PeBenito 9e90ce
##	</summary>
Chris PeBenito 9e90ce
## </param>
Chris PeBenito 9e90ce
#
Chris PeBenito 9e90ce
interface(`policykit_read_lib',`
Chris PeBenito 9e90ce
	gen_require(`
Chris PeBenito 9e90ce
		type policykit_var_lib_t;
Chris PeBenito 9e90ce
	')
Chris PeBenito 9e90ce
Chris PeBenito 9e90ce
	files_search_var_lib($1)
Chris PeBenito af5374
	read_files_pattern($1, policykit_var_lib_t, policykit_var_lib_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	# Broken placement
Dan Walsh 3eaa99
	cron_read_system_job_lib_files($1)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	The per role template for the policykit module.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="user_role">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Role allowed access
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
## <param name="user_domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	User domain for the role
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
template(`policykit_role',`
Dan Walsh 3eaa99
	policykit_run_auth($2, $1)
Dan Walsh 3eaa99
	policykit_run_grant($2, $1)
Dan Walsh 3eaa99
	policykit_read_lib($2)
Dan Walsh 3eaa99
	policykit_read_reload($2)
Dan Walsh 3eaa99
	policykit_dbus_chat($2)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Send generic signal to policy_auth
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Domain allowed to transition.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`policykit_signal_auth',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type policykit_auth_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $1 policykit_auth_t:process signal;
Chris PeBenito 9e90ce
')