Chris PeBenito 17de1b
## <summary>Hardware abstraction layer</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute hal in the hal domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_t, hald_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	domtrans_pattern($1, hald_exec_t, hald_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito fcee22
##	Get the attributes of a hal process.
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	Domain allowed access.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`hal_getattr',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type hald_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito fcee22
	allow $1 hald_t:process getattr;
Chris PeBenito fcee22
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito fcee22
##	Read hal system state
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	Domain to not audit.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`hal_read_state',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type hald_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito 9de7c1
	ps_process_pattern($1, hald_t)
Chris PeBenito fcee22
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito 016e5c
##	Allow ptrace of hal domain
Chris PeBenito 016e5c
## </summary>
Chris PeBenito 016e5c
## <param name="domain">
Chris PeBenito 016e5c
##	<summary>
Chris PeBenito 016e5c
##	Domain allowed access.
Chris PeBenito 016e5c
##	</summary>
Chris PeBenito 016e5c
## </param>
Chris PeBenito 016e5c
#
Chris PeBenito 016e5c
interface(`hal_ptrace',`
Chris PeBenito 016e5c
	gen_require(`
Chris PeBenito 016e5c
		type hald_t;
Chris PeBenito 016e5c
	')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
	allow $1 hald_t:process ptrace;
Chris PeBenito 016e5c
')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
########################################
Chris PeBenito 016e5c
## <summary>
Chris PeBenito 016e5c
##	Allow domain to use file descriptors from hal.
Chris PeBenito 016e5c
## </summary>
Chris PeBenito 016e5c
## <param name="domain">
Chris PeBenito 016e5c
##	<summary>
Chris PeBenito 016e5c
##	Domain to not audit.
Chris PeBenito 016e5c
##	</summary>
Chris PeBenito 016e5c
## </param>
Chris PeBenito 016e5c
#
Chris PeBenito 016e5c
interface(`hal_use_fds',`
Chris PeBenito 016e5c
	gen_require(`
Chris PeBenito 016e5c
		type hald_t;
Chris PeBenito 016e5c
	')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
	allow $1 hald_t:fd use; 
Chris PeBenito 016e5c
')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
########################################
Chris PeBenito 016e5c
## <summary>
Chris PeBenito 6b19be
##	Do not audit attempts to use file descriptors from hal.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain to not audit.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`hal_dontaudit_use_fds',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type hald_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	dontaudit $1 hald_t:fd use; 
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 016e5c
##	Allow attempts to read and write to
Chris PeBenito 016e5c
##	hald unnamed pipes.
Chris PeBenito 016e5c
## </summary>
Chris PeBenito 016e5c
## <param name="domain">
Chris PeBenito 016e5c
##	<summary>
Chris PeBenito 016e5c
##	Domain to not audit.
Chris PeBenito 016e5c
##	</summary>
Chris PeBenito 016e5c
## </param>
Chris PeBenito 016e5c
#
Chris PeBenito 016e5c
interface(`hal_rw_pipes',`
Chris PeBenito 016e5c
	gen_require(`
Chris PeBenito 016e5c
		type hald_t;
Chris PeBenito 016e5c
	')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
	allow $1 hald_t:fifo_file rw_fifo_file_perms; 
Chris PeBenito 016e5c
')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
########################################
Chris PeBenito 016e5c
## <summary>
Chris PeBenito 6b19be
##	Do not audit attempts to read and write to
Chris PeBenito 6b19be
##	hald unnamed pipes.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain to not audit.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`hal_dontaudit_rw_pipes',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type hald_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	dontaudit $1 hald_t:fifo_file rw_fifo_file_perms; 
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 17de1b
##	Send to hal over a unix domain
Chris PeBenito 17de1b
##	datagram socket.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_dgram_send',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hald_t:unix_dgram_socket sendto;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send to hal over a unix domain
Chris PeBenito 17de1b
##	stream socket.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_stream_connect',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hald_t:unix_stream_socket connectto;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 21673b
##	Dontaudit read/write to a hal unix datagram socket.
Chris PeBenito 21673b
## </summary>
Chris PeBenito 21673b
## <param name="domain">
Chris PeBenito 21673b
##	<summary>
Chris PeBenito 21673b
##	Domain allowed access.
Chris PeBenito 21673b
##	</summary>
Chris PeBenito 21673b
## </param>
Chris PeBenito 21673b
#
Chris PeBenito 21673b
interface(`hal_dontaudit_rw_dgram_sockets',`
Chris PeBenito 21673b
	gen_require(`
Chris PeBenito 21673b
		type hald_t;
Chris PeBenito 21673b
	')
Chris PeBenito 21673b
Chris PeBenito 21673b
	dontaudit $1 hald_t:unix_dgram_socket { read write };
Chris PeBenito 21673b
')
Chris PeBenito 21673b
Chris PeBenito 21673b
########################################
Chris PeBenito 21673b
## <summary>
Chris PeBenito 17de1b
##	Send a dbus message to hal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_dbus_send',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_t;
Chris PeBenito 17de1b
		class dbus send_msg;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hald_t:dbus send_msg;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send and receive messages from
Chris PeBenito 17de1b
##	hal over dbus.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_dbus_chat',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_t;
Chris PeBenito 17de1b
		class dbus send_msg;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 hald_t:dbus send_msg;
Chris PeBenito 17de1b
	allow hald_t $1:dbus send_msg;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 9de7c1
##	Execute hal mac in the hal mac domain.
Chris PeBenito 9de7c1
## </summary>
Chris PeBenito 9de7c1
## <param name="domain">
Chris PeBenito 9de7c1
##	<summary>
Chris PeBenito 9de7c1
##	Domain allowed access.
Chris PeBenito 9de7c1
##	</summary>
Chris PeBenito 9de7c1
## </param>
Chris PeBenito 9de7c1
#
Chris PeBenito 9de7c1
interface(`hal_domtrans_mac',`
Chris PeBenito 9de7c1
	gen_require(`
Chris PeBenito 9de7c1
		type hald_mac_t, hald_mac_exec_t;
Chris PeBenito 9de7c1
	')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
	domtrans_pattern($1, hald_mac_exec_t, hald_mac_t)
Chris PeBenito 9de7c1
')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
########################################
Chris PeBenito 9de7c1
## <summary>
Chris PeBenito 016e5c
##	Allow attempts to write the hal
Chris PeBenito 016e5c
##	log files.
Chris PeBenito 016e5c
## </summary>
Chris PeBenito 016e5c
## <param name="domain">
Chris PeBenito 016e5c
##	<summary>
Chris PeBenito f12302
##	Domain allowed access.
Chris PeBenito 016e5c
##	</summary>
Chris PeBenito 016e5c
## </param>
Chris PeBenito 016e5c
#
Chris PeBenito 016e5c
interface(`hal_write_log',`
Chris PeBenito 016e5c
	gen_require(`
Chris PeBenito 016e5c
		type hald_log_t;
Chris PeBenito 016e5c
	')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
	logging_search_logs($1)
Chris PeBenito 016e5c
	allow $1 hald_log_t:file write_file_perms;
Chris PeBenito 016e5c
')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
########################################
Chris PeBenito 016e5c
## <summary>
Chris PeBenito 016e5c
##	Do not audit attempts to write the hal
Chris PeBenito 016e5c
##	log files.
Chris PeBenito 016e5c
## </summary>
Chris PeBenito 016e5c
## <param name="domain">
Chris PeBenito 016e5c
##	<summary>
Chris PeBenito 016e5c
##	Domain to not audit
Chris PeBenito 016e5c
##	</summary>
Chris PeBenito 016e5c
## </param>
Chris PeBenito 016e5c
#
Chris PeBenito 016e5c
interface(`hal_dontaudit_write_log',`
Chris PeBenito 016e5c
	gen_require(`
Chris PeBenito 016e5c
		type hald_log_t;
Chris PeBenito 016e5c
	')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
	dontaudit $1 hald_log_t:file { append write };
Chris PeBenito 016e5c
')
Chris PeBenito 016e5c
Chris PeBenito 016e5c
########################################
Chris PeBenito 016e5c
## <summary>
Chris PeBenito 9de7c1
##	Manage hald log files.
Chris PeBenito 9de7c1
## </summary>
Chris PeBenito 9de7c1
## <param name="domain">
Chris PeBenito 9de7c1
##	<summary>
Chris PeBenito 9de7c1
##	Domain allowed access.
Chris PeBenito 9de7c1
##	</summary>
Chris PeBenito 9de7c1
## </param>
Chris PeBenito 9de7c1
#
Chris PeBenito 9de7c1
interface(`hal_manage_log',`
Chris PeBenito 9de7c1
	gen_require(`
Chris PeBenito 9de7c1
		type hald_log_t;
Chris PeBenito 9de7c1
	')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
	# log files for hald
Chris PeBenito 9de7c1
	manage_files_pattern($1, hald_log_t, hald_log_t)
Chris PeBenito 9de7c1
	logging_log_filetrans($1, hald_log_t, file)
Chris PeBenito 9de7c1
')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
########################################
Chris PeBenito 9de7c1
## <summary>
Chris PeBenito 17de1b
##	Read hald tmp files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_read_tmp_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_tmp_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 hald_tmp_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito d6d16b
##	Do not audit attempts to read or write
Chris PeBenito d6d16b
##	HAL libraries files
Chris PeBenito d6d16b
## </summary>
Chris PeBenito d6d16b
## <param name="domain">
Chris PeBenito d6d16b
##	<summary>
Chris PeBenito d6d16b
##	Domain allowed access.
Chris PeBenito d6d16b
##	</summary>
Chris PeBenito d6d16b
## </param>
Chris PeBenito d6d16b
#
Chris PeBenito d6d16b
interface(`hal_dontaudit_append_lib_files',`
Chris PeBenito d6d16b
	gen_require(`
Chris PeBenito d6d16b
		type hald_var_lib_t;
Chris PeBenito d6d16b
	')
Chris PeBenito d6d16b
Chris PeBenito c0868a
	dontaudit $1 hald_var_lib_t:file { read_file_perms append_file_perms };
Chris PeBenito d6d16b
')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
########################################
Chris PeBenito d6d16b
## <summary>
Chris PeBenito 17de1b
##	Read hald PID files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_read_pid_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	allow $1 hald_var_run_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read/Write hald PID files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`hal_rw_pid_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hald_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito 17de1b
	allow $1 hald_var_run_t:file rw_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
########################################
Chris PeBenito 9de7c1
## <summary>
Chris PeBenito 9de7c1
##	Manage hald PID dirs.
Chris PeBenito 9de7c1
## </summary>
Chris PeBenito 9de7c1
## <param name="domain">
Chris PeBenito 9de7c1
##	<summary>
Chris PeBenito 9de7c1
##	Domain allowed access.
Chris PeBenito 9de7c1
##	</summary>
Chris PeBenito 9de7c1
## </param>
Chris PeBenito 9de7c1
#
Chris PeBenito 9de7c1
interface(`hal_manage_pid_dirs',`
Chris PeBenito 9de7c1
	gen_require(`
Chris PeBenito 9de7c1
		type hald_var_run_t;
Chris PeBenito 9de7c1
	')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
	files_search_pids($1)
Chris PeBenito 9de7c1
	manage_dirs_pattern($1, hald_var_run_t, hald_var_run_t)
Chris PeBenito 9de7c1
')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
########################################
Chris PeBenito 9de7c1
## <summary>
Chris PeBenito 9de7c1
##	Manage hald PID files.
Chris PeBenito 9de7c1
## </summary>
Chris PeBenito 9de7c1
## <param name="domain">
Chris PeBenito 9de7c1
##	<summary>
Chris PeBenito 9de7c1
##	Domain allowed access.
Chris PeBenito 9de7c1
##	</summary>
Chris PeBenito 9de7c1
## </param>
Chris PeBenito 9de7c1
#
Chris PeBenito 9de7c1
interface(`hal_manage_pid_files',`
Chris PeBenito 9de7c1
	gen_require(`
Chris PeBenito 9de7c1
		type hald_var_run_t;
Chris PeBenito 9de7c1
	')
Chris PeBenito 9de7c1
Chris PeBenito 9de7c1
	files_search_pids($1)
Chris PeBenito 9de7c1
	manage_files_pattern($1, hald_var_run_t, hald_var_run_t)
Chris PeBenito 9de7c1
')