1ec3d1a
policy_module(firstboot, 1.12.0)
1ec3d1a
1ec3d1a
gen_require(`
f55a90e
	class passwd { passwd chfn chsh rootok crontab };
1ec3d1a
')
1ec3d1a
1ec3d1a
########################################
1ec3d1a
#
1ec3d1a
# Declarations
1ec3d1a
#
1ec3d1a
1ec3d1a
type firstboot_t;
1ec3d1a
type firstboot_exec_t;
1ec3d1a
init_system_domain(firstboot_t, firstboot_exec_t)
1ec3d1a
domain_obj_id_change_exemption(firstboot_t)
1ec3d1a
domain_subj_id_change_exemption(firstboot_t)
1ec3d1a
role system_r types firstboot_t;
1ec3d1a
1ec3d1a
type firstboot_etc_t;
1ec3d1a
files_config_file(firstboot_etc_t)
1ec3d1a
1ec3d1a
########################################
1ec3d1a
#
1ec3d1a
# Local policy
1ec3d1a
#
1ec3d1a
1ec3d1a
allow firstboot_t self:capability { dac_override setgid };
1ec3d1a
allow firstboot_t self:process setfscreate;
1ec3d1a
allow firstboot_t self:fifo_file rw_fifo_file_perms;
1ec3d1a
allow firstboot_t self:tcp_socket create_stream_socket_perms;
1ec3d1a
allow firstboot_t self:unix_stream_socket { connect create };
f55a90e
allow firstboot_t self:passwd { rootok passwd chfn chsh };
1ec3d1a
1ec3d1a
allow firstboot_t firstboot_etc_t:file read_file_perms;
1ec3d1a
20ca08c
files_manage_generic_tmp_dirs(firstboot_t)
20ca08c
files_manage_generic_tmp_files(firstboot_t)
1ec3d1a
1ec3d1a
kernel_read_system_state(firstboot_t)
1ec3d1a
kernel_read_kernel_sysctls(firstboot_t)
1ec3d1a
1ec3d1a
corenet_all_recvfrom_netlabel(firstboot_t)
1ec3d1a
corenet_tcp_sendrecv_generic_if(firstboot_t)
1ec3d1a
corenet_tcp_sendrecv_generic_node(firstboot_t)
1ec3d1a
corenet_tcp_sendrecv_all_ports(firstboot_t)
1ec3d1a
1ec3d1a
dev_read_urand(firstboot_t)
1ec3d1a
1ec3d1a
selinux_get_fs_mount(firstboot_t)
1ec3d1a
selinux_validate_context(firstboot_t)
1ec3d1a
selinux_compute_access_vector(firstboot_t)
1ec3d1a
selinux_compute_create_context(firstboot_t)
1ec3d1a
selinux_compute_relabel_context(firstboot_t)
1ec3d1a
selinux_compute_user_contexts(firstboot_t)
1ec3d1a
1ec3d1a
auth_dontaudit_getattr_shadow(firstboot_t)
1ec3d1a
1ec3d1a
corecmd_exec_all_executables(firstboot_t)
1ec3d1a
1ec3d1a
files_exec_etc_files(firstboot_t)
1ec3d1a
files_manage_etc_files(firstboot_t)
1ec3d1a
files_manage_etc_runtime_files(firstboot_t)
1ec3d1a
files_manage_var_dirs(firstboot_t)
1ec3d1a
files_manage_var_files(firstboot_t)
1ec3d1a
files_manage_var_symlinks(firstboot_t)
1ec3d1a
files_create_boot_flag(firstboot_t)
1ec3d1a
files_delete_boot_flag(firstboot_t)
1ec3d1a
1ec3d1a
init_domtrans_script(firstboot_t)
1ec3d1a
init_rw_utmp(firstboot_t)
1ec3d1a
1ec3d1a
libs_exec_ld_so(firstboot_t)
1ec3d1a
libs_exec_lib_files(firstboot_t)
1ec3d1a
1ec3d1a
locallogin_use_fds(firstboot_t)
1ec3d1a
1ec3d1a
logging_send_syslog_msg(firstboot_t)
1ec3d1a
1ec3d1a
sysnet_dns_name_resolve(firstboot_t)
1ec3d1a
1ec3d1a
userdom_use_inherited_user_terminals(firstboot_t)
be895b1
1ec3d1a
# Add/remove user home directories
1ec3d1a
userdom_manage_user_home_content_dirs(firstboot_t)
1ec3d1a
userdom_manage_user_home_content_files(firstboot_t)
1ec3d1a
userdom_manage_user_home_content_symlinks(firstboot_t)
1ec3d1a
userdom_manage_user_home_content_pipes(firstboot_t)
1ec3d1a
userdom_manage_user_home_content_sockets(firstboot_t)
1ec3d1a
userdom_home_filetrans_user_home_dir(firstboot_t)
1ec3d1a
userdom_user_home_dir_filetrans_user_home_content(firstboot_t, { dir file lnk_file fifo_file sock_file })
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	dbus_system_bus_client(firstboot_t)
1ec3d1a
1ec3d1a
	optional_policy(`
1ec3d1a
		hal_dbus_chat(firstboot_t)
1ec3d1a
	')
1ec3d1a
')
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	modutils_domtrans_insmod(firstboot_t)
1ec3d1a
	modutils_domtrans_depmod(firstboot_t)
1ec3d1a
	modutils_read_module_config(firstboot_t)
1ec3d1a
	modutils_read_module_deps(firstboot_t)
1ec3d1a
')
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	samba_rw_config(firstboot_t)
1ec3d1a
')
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	unconfined_domtrans(firstboot_t)
1ec3d1a
	# The big hammer
1ec3d1a
	unconfined_domain_noaudit(firstboot_t)
1ec3d1a
')
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	gnome_admin_home_gconf_filetrans(firstboot_t, dir)
1ec3d1a
	gnome_manage_config(firstboot_t)
1ec3d1a
')
1ec3d1a
1ec3d1a
optional_policy(`
1ec3d1a
	xserver_domtrans(firstboot_t)
1ec3d1a
	xserver_rw_shm(firstboot_t)
1ec3d1a
	xserver_unconfined(firstboot_t)
1ec3d1a
	xserver_stream_connect(firstboot_t)
1ec3d1a
')