Chris PeBenito 62a7b0
## <summary>Network analysis utilities</summary>
Chris PeBenito 10abae
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute network utilities in the netutils domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito 10abae
#
Chris PeBenito 199895
interface(`netutils_domtrans',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type netutils_t, netutils_exec_t;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	domain_auto_trans($1,netutils_exec_t,netutils_t)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 netutils_t:fd use;
Chris PeBenito 0c73cd
	allow netutils_t $1:fd use;
Chris PeBenito 0c73cd
	allow netutils_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow netutils_t $1:process sigchld;
Chris PeBenito 10abae
')
Chris PeBenito 10abae
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute network utilities in the netutils domain, and
Chris PeBenito ab940a
##	allow the specified role the netutils domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The role to be allowed the netutils domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="terminal">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the terminal allow the netutils domain to use.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito 10abae
#
Chris PeBenito ab940a
interface(`netutils_run',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type netutils_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	netutils_domtrans($1)
Chris PeBenito ab940a
	role $2 types netutils_t;
Chris PeBenito ab940a
	allow netutils_t $3:chr_file rw_term_perms;
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute network utilities in the caller domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito 10abae
#
Chris PeBenito 199895
interface(`netutils_exec',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type netutils_exec_t;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	can_exec($1,netutils_exec_t)
Chris PeBenito 10abae
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute ping in the ping domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_domtrans_ping',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type ping_t, ping_exec_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	domain_auto_trans($1,ping_exec_t,ping_t)
Chris PeBenito ab940a
Chris PeBenito ab940a
	allow $1 ping_t:fd use;
Chris PeBenito ab940a
	allow ping_t $1:fd use;
Chris PeBenito ab940a
	allow ping_t $1:fifo_file rw_file_perms;
Chris PeBenito ab940a
	allow ping_t $1:process sigchld;
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute ping in the ping domain, and
Chris PeBenito ab940a
##	allow the specified role the ping domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The role to be allowed the ping domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="terminal">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the terminal allow the ping domain to use.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_run_ping',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type ping_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	netutils_domtrans_ping($1)
Chris PeBenito ab940a
	role $2 types ping_t;
Chris PeBenito ab940a
	allow ping_t $3:chr_file rw_term_perms;
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito 1f91e1
##	Conditionally execute ping in the ping domain, and
Chris PeBenito 1f91e1
##	allow the specified role the ping domain.
Chris PeBenito 1f91e1
## </summary>
Chris PeBenito 1f91e1
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The role to be allowed the ping domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
## <param name="terminal">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The type of the terminal allow the ping domain to use.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
#
Chris PeBenito 1f91e1
interface(`netutils_run_ping_cond',`
Chris PeBenito 1f91e1
	gen_require(`
Chris PeBenito 1f91e1
		type ping_t;
Chris PeBenito 1f91e1
		bool user_ping;
Chris PeBenito 1f91e1
	')
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
	role $2 types ping_t;
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
	if ( user_ping ) {
Chris PeBenito 1f91e1
		netutils_domtrans_ping($1)
Chris PeBenito 1f91e1
		allow ping_t $3:chr_file rw_term_perms;
Chris PeBenito 1f91e1
	}
Chris PeBenito 1f91e1
')
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
########################################
Chris PeBenito 1f91e1
## <summary>
Chris PeBenito ab940a
##	Execute ping in the caller domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_exec_ping',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type ping_exec_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	can_exec($1,ping_exec_t)
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute traceroute in the traceroute domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_domtrans_traceroute',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type traceroute_t, traceroute_exec_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	domain_auto_trans($1,traceroute_exec_t,traceroute_t)
Chris PeBenito ab940a
Chris PeBenito ab940a
	allow $1 traceroute_t:fd use;
Chris PeBenito ab940a
	allow traceroute_t $1:fd use;
Chris PeBenito ab940a
	allow traceroute_t $1:fifo_file rw_file_perms;
Chris PeBenito ab940a
	allow traceroute_t $1:process sigchld;
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito ab940a
##	Execute traceroute in the traceroute domain, and
Chris PeBenito ab940a
##	allow the specified role the traceroute domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The role to be allowed the traceroute domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
## <param name="terminal">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the terminal allow the traceroute domain to use.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_run_traceroute',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type traceroute_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	netutils_domtrans_traceroute($1)
Chris PeBenito ab940a
	role $2 types traceroute_t;
Chris PeBenito ab940a
	allow traceroute_t $3:chr_file rw_term_perms;
Chris PeBenito ab940a
')
Chris PeBenito ab940a
Chris PeBenito ab940a
########################################
Chris PeBenito ceebe3
## <summary>
Chris PeBenito 1f91e1
##	Conditionally execute traceroute in the traceroute domain, and
Chris PeBenito 1f91e1
##	allow the specified role the traceroute domain.
Chris PeBenito 1f91e1
## </summary>
Chris PeBenito 1f91e1
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
## <param name="role">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The role to be allowed the traceroute domain.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
## <param name="terminal">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 1f91e1
##	The type of the terminal allow the traceroute domain to use.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 1f91e1
## </param>
Chris PeBenito 1f91e1
#
Chris PeBenito 1f91e1
interface(`netutils_run_traceroute_cond',`
Chris PeBenito 1f91e1
	gen_require(`
Chris PeBenito 1f91e1
		type traceroute_t;
Chris PeBenito 1f91e1
		bool user_ping;
Chris PeBenito 1f91e1
	')
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
	role $2 types traceroute_t;
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
	if( user_ping ) {
Chris PeBenito 1f91e1
		netutils_domtrans_traceroute($1)
Chris PeBenito 1f91e1
		allow traceroute_t $3:chr_file rw_term_perms;
Chris PeBenito 1f91e1
	}
Chris PeBenito 1f91e1
')
Chris PeBenito 1f91e1
Chris PeBenito 1f91e1
########################################
Chris PeBenito 1f91e1
## <summary>
Chris PeBenito ab940a
##	Execute traceroute in the caller domain.
Chris PeBenito ceebe3
## </summary>
Chris PeBenito ab940a
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito ab940a
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito ab940a
## </param>
Chris PeBenito ab940a
#
Chris PeBenito ab940a
interface(`netutils_exec_traceroute',`
Chris PeBenito ab940a
	gen_require(`
Chris PeBenito ab940a
		type traceroute_exec_t;
Chris PeBenito ab940a
	')
Chris PeBenito ab940a
Chris PeBenito ab940a
	can_exec($1,traceroute_exec_t)
Chris PeBenito ab940a
')