1ec3d1a
## <summary>
1ec3d1a
##	Final system configuration run during the first boot
1ec3d1a
##	after installation of Red Hat/Fedora systems.
1ec3d1a
## </summary>
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Execute firstboot in the firstboot domain.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain allowed to transition.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_domtrans',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t, firstboot_exec_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	domtrans_pattern($1, firstboot_exec_t, firstboot_t)
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Execute firstboot in the firstboot domain, and
1ec3d1a
##	allow the specified role the firstboot domain.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain allowed to transition.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
## <param name="role">
1ec3d1a
##	<summary>
1ec3d1a
##	Role allowed access.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_run',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	firstboot_domtrans($1)
1ec3d1a
	role $2 types firstboot_t;
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Inherit and use a file descriptor from firstboot.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain allowed access.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_use_fds',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	allow $1 firstboot_t:fd use;
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Do not audit attempts to inherit a
1ec3d1a
##	file descriptor from firstboot.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain to not audit.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_dontaudit_use_fds',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	dontaudit $1 firstboot_t:fd use;
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	dontaudit read and write an leaked file descriptors
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain to not audit.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_dontaudit_leaks',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	dontaudit $1 firstboot_t:socket_class_set { read write };
1ec3d1a
	dontaudit $1 firstboot_t:fifo_file rw_inherited_fifo_file_perms;
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Write to a firstboot unnamed pipe.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain allowed access.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_write_pipes',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	allow $1 firstboot_t:fd use;
1ec3d1a
	allow $1 firstboot_t:fifo_file write;
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
##	Read and Write to a firstboot unnamed pipe.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain allowed access.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_rw_pipes',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	allow $1 firstboot_t:fifo_file { read write };
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
## 	Do not audit attemps to read and write to a firstboot unnamed pipe.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain to not audit.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_dontaudit_rw_pipes',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	dontaudit $1 firstboot_t:fifo_file { read write };
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
## <summary>
1ec3d1a
## 	Do not audit attemps to read and write to a firstboot
1ec3d1a
##	unix domain stream socket.
1ec3d1a
## </summary>
1ec3d1a
## <param name="domain">
1ec3d1a
##	<summary>
1ec3d1a
##	Domain to not audit.
1ec3d1a
##	</summary>
1ec3d1a
## </param>
1ec3d1a
#
1ec3d1a
interface(`firstboot_dontaudit_rw_stream_sockets',`
1ec3d1a
	gen_require(`
1ec3d1a
		type firstboot_t;
1ec3d1a
	')
1ec3d1a
1ec3d1a
	dontaudit $1 firstboot_t:unix_stream_socket { read write };
1ec3d1a
')