Chris PeBenito 3865d6
## <module name="hostname" layer="system">
Chris PeBenito 32e53a
## <summary>Policy for changing the system host name.</summary>
Chris PeBenito 15e3d8
Chris PeBenito 32e53a
########################################
Chris PeBenito c9428d
## <interface name="hostname_domtrans">
Chris PeBenito 32e53a
##	<description>
Chris PeBenito 32e53a
##		Execute hostname in the hostname domain.
Chris PeBenito 32e53a
##	</description>
Chris PeBenito 32e53a
##	<parameter name="domain">
Chris PeBenito 32e53a
##		The type of the process performing this action.
Chris PeBenito 4bf4ed
##		Has a sigchld signal backchannel.
Chris PeBenito 32e53a
##	</parameter>
Chris PeBenito 32e53a
## </interface>
Chris PeBenito 15e3d8
#
Chris PeBenito c9428d
define(`hostname_domtrans',`
Chris PeBenito fa7bea
	gen_require(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	allow $1 hostname_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 hostname_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 hostname_exec_t:process hostname_t;
Chris PeBenito 0c73cd
	dontaudit $1 hostname_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 hostname_t:fd use;
Chris PeBenito 0c73cd
	allow hostname_t $1:fd use;
Chris PeBenito 0c73cd
	allow hostname_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow hostname_t $1:process sigchld;
Chris PeBenito 15e3d8
')
Chris PeBenito 15e3d8
Chris PeBenito c9428d
define(`hostname_domtrans_depend',`
Chris PeBenito 0c73cd
	type hostname_t, hostname_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito 15e3d8
')
Chris PeBenito 15e3d8
Chris PeBenito 32e53a
########################################
Chris PeBenito c9428d
## <interface name="hostname_run">
Chris PeBenito 32e53a
##	<description>
Chris PeBenito 32e53a
##		Execute hostname in the hostname domain, and
Chris PeBenito 32e53a
##		allow the specified role the hostname domain.
Chris PeBenito 4bf4ed
##		Has a sigchld signal backchannel.
Chris PeBenito 32e53a
##	</description>
Chris PeBenito 32e53a
##	<parameter name="domain">
Chris PeBenito 32e53a
##		The type of the process performing this action.
Chris PeBenito 32e53a
##	</parameter>
Chris PeBenito 32e53a
##	<parameter name="role">
Chris PeBenito 32e53a
##		The role to be allowed the hostname domain.
Chris PeBenito 32e53a
##	</parameter>
Chris PeBenito 32e53a
##	<parameter name="terminal">
Chris PeBenito 32e53a
##		The type of the terminal allow the hostname domain to use.
Chris PeBenito 32e53a
##	</parameter>
Chris PeBenito 32e53a
## </interface>
Chris PeBenito 32e53a
#
Chris PeBenito c9428d
define(`hostname_run',`
Chris PeBenito fa7bea
	gen_require(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	hostname_domtrans($1)
Chris PeBenito 0c73cd
	role $2 types hostname_t;
Chris PeBenito 0c73cd
	allow hostname_t $3:chr_file { getattr read write ioctl };
Chris PeBenito 32e53a
')
Chris PeBenito 32e53a
Chris PeBenito c9428d
define(`hostname_run_depend',`
Chris PeBenito 0c73cd
	type hostname_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr read write ioctl };
Chris PeBenito 32e53a
')
Chris PeBenito 32e53a
Chris PeBenito 3865d6
########################################
Chris PeBenito c9428d
## <interface name="hostname_exec">
Chris PeBenito 3865d6
##     <description>
Chris PeBenito 3865d6
##             Execute hostname in the hostname domain, and
Chris PeBenito 3865d6
##             Has a sigchld signal backchannel.
Chris PeBenito 3865d6
##     </description>
Chris PeBenito 3865d6
##     <parameter name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 3865d6
##     </parameter>
Chris PeBenito 3865d6
## </interface>
Chris PeBenito 3865d6
#
Chris PeBenito 15e3d8
#######################################
Chris PeBenito 15e3d8
#
Chris PeBenito c9428d
# hostname_exec(domain)
Chris PeBenito 15e3d8
#
Chris PeBenito c9428d
define(`hostname_exec',`
Chris PeBenito fa7bea
	gen_require(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	can_exec($1,hostname_exec_t)
Chris PeBenito dd8229
Chris PeBenito 15e3d8
')
Chris PeBenito 15e3d8
Chris PeBenito c9428d
define(`hostname_exec_depend',`
Chris PeBenito 0c73cd
	type hostname_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class file { getattr read execute execute_no_trans };
Chris PeBenito 15e3d8
')
Chris PeBenito 32e53a
Chris PeBenito 32e53a
## </module>