Chris PeBenito 7e265a
policy_module(shutdown, 1.0.0)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
########################################
Chris PeBenito 7e265a
#
Chris PeBenito 7e265a
# Declarations
Chris PeBenito 7e265a
#
Chris PeBenito 7e265a
Chris PeBenito 7e265a
type shutdown_t;
Chris PeBenito 7e265a
type shutdown_exec_t;
Chris PeBenito 7e265a
application_domain(shutdown_t, shutdown_exec_t)
Chris PeBenito 7e265a
role system_r types shutdown_t;
Chris PeBenito 7e265a
Chris PeBenito 7e265a
type shutdown_etc_t;
Chris PeBenito 7e265a
files_config_file(shutdown_etc_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
type shutdown_var_run_t;
Chris PeBenito 7e265a
files_pid_file(shutdown_var_run_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
########################################
Chris PeBenito 7e265a
#
Chris PeBenito 7e265a
# shutdown local policy
Chris PeBenito 7e265a
#
Chris PeBenito 7e265a
Chris PeBenito 7e265a
allow shutdown_t self:capability { dac_override kill setuid sys_tty_config };
Chris PeBenito 7e265a
allow shutdown_t self:process { fork signal signull };
Chris PeBenito 7e265a
Chris PeBenito 7e265a
allow shutdown_t self:fifo_file manage_fifo_file_perms;
Chris PeBenito 7e265a
allow shutdown_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 7e265a
Chris PeBenito 7e265a
manage_files_pattern(shutdown_t, shutdown_etc_t, shutdown_etc_t)
Chris PeBenito 7e265a
files_etc_filetrans(shutdown_t, shutdown_etc_t, file)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
manage_files_pattern(shutdown_t, shutdown_var_run_t, shutdown_var_run_t)
Chris PeBenito 7e265a
files_pid_filetrans(shutdown_t, shutdown_var_run_t, file)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
files_read_etc_files(shutdown_t)
Chris PeBenito 7e265a
files_read_generic_pids(shutdown_t)
Chris PeBenito 7e265a
Dan Walsh 3eaa99
mls_file_write_to_clearance(shutdown_t)
Dan Walsh 3eaa99
Chris PeBenito 7e265a
term_use_all_terms(shutdown_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
auth_use_nsswitch(shutdown_t)
Chris PeBenito 7e265a
auth_write_login_records(shutdown_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
init_dontaudit_write_utmp(shutdown_t)
Chris PeBenito 7e265a
init_read_utmp(shutdown_t)
Chris PeBenito 7e265a
init_telinit(shutdown_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
logging_send_audit_msgs(shutdown_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
miscfiles_read_localization(shutdown_t)
Chris PeBenito 7e265a
Chris PeBenito 7e265a
optional_policy(`
Chris PeBenito 7e265a
	dbus_system_bus_client(shutdown_t)
Chris PeBenito 7e265a
	dbus_connect_system_bus(shutdown_t)
Chris PeBenito 7e265a
')
Chris PeBenito 7e265a
Chris PeBenito 7e265a
optional_policy(`
Dan Walsh 3eaa99
    oddjob_dontaudit_rw_fifo_file(shutdown_t)
Dan Walsh 3eaa99
    oddjob_sigchld(shutdown_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito 7e265a
	xserver_dontaudit_write_log(shutdown_t)
Chris PeBenito 7e265a
')