2005-08-17 14:14:07 +00:00
|
|
|
|
2010-03-16 17:12:22 +00:00
|
|
|
policy_module(firstboot, 1.10.1)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
2005-09-19 14:18:48 +00:00
|
|
|
gen_require(`
|
|
|
|
class passwd rootok;
|
|
|
|
')
|
|
|
|
|
2005-08-17 14:14:07 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type firstboot_t;
|
|
|
|
type firstboot_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_system_domain(firstboot_t, firstboot_exec_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
domain_obj_id_change_exemption(firstboot_t)
|
|
|
|
domain_subj_id_change_exemption(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
role system_r types firstboot_t;
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type firstboot_etc_t;
|
|
|
|
files_config_file(firstboot_etc_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow firstboot_t self:capability { dac_override setgid };
|
|
|
|
allow firstboot_t self:process setfscreate;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow firstboot_t self:fifo_file rw_fifo_file_perms;
|
2005-08-17 14:14:07 +00:00
|
|
|
allow firstboot_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow firstboot_t self:unix_stream_socket { connect create };
|
|
|
|
allow firstboot_t self:passwd rootok;
|
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow firstboot_t firstboot_etc_t:file read_file_perms;
|
2005-08-17 14:14:07 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(firstboot_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(firstboot_t)
|
|
|
|
corenet_all_recvfrom_netlabel(firstboot_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(firstboot_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(firstboot_t)
|
|
|
|
|
|
|
|
dev_read_urand(firstboot_t)
|
|
|
|
|
|
|
|
selinux_get_fs_mount(firstboot_t)
|
|
|
|
selinux_validate_context(firstboot_t)
|
|
|
|
selinux_compute_access_vector(firstboot_t)
|
|
|
|
selinux_compute_create_context(firstboot_t)
|
|
|
|
selinux_compute_relabel_context(firstboot_t)
|
|
|
|
selinux_compute_user_contexts(firstboot_t)
|
|
|
|
|
|
|
|
auth_dontaudit_getattr_shadow(firstboot_t)
|
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
corecmd_exec_all_executables(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
|
|
|
files_exec_etc_files(firstboot_t)
|
|
|
|
files_manage_etc_files(firstboot_t)
|
2006-09-04 15:15:35 +00:00
|
|
|
files_manage_etc_runtime_files(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
files_read_usr_files(firstboot_t)
|
|
|
|
files_manage_var_dirs(firstboot_t)
|
|
|
|
files_manage_var_files(firstboot_t)
|
|
|
|
files_manage_var_symlinks(firstboot_t)
|
|
|
|
|
2005-10-26 16:00:13 +00:00
|
|
|
init_domtrans_script(firstboot_t)
|
2006-01-18 18:08:39 +00:00
|
|
|
init_rw_utmp(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
|
|
|
libs_exec_ld_so(firstboot_t)
|
|
|
|
libs_exec_lib_files(firstboot_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
locallogin_use_fds(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
|
|
|
logging_send_syslog_msg(firstboot_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(firstboot_t)
|
|
|
|
|
|
|
|
modutils_domtrans_insmod(firstboot_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
modutils_read_module_config(firstboot_t)
|
|
|
|
modutils_read_module_deps(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_use_user_terminals(firstboot_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
# Add/remove user home directories
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_manage_user_home_content_dirs(firstboot_t)
|
|
|
|
userdom_manage_user_home_content_files(firstboot_t)
|
|
|
|
userdom_manage_user_home_content_symlinks(firstboot_t)
|
|
|
|
userdom_manage_user_home_content_pipes(firstboot_t)
|
|
|
|
userdom_manage_user_home_content_sockets(firstboot_t)
|
|
|
|
userdom_home_filetrans_user_home_dir(firstboot_t)
|
|
|
|
userdom_user_home_dir_filetrans_user_home_content(firstboot_t, { dir file lnk_file fifo_file sock_file })
|
2005-09-15 15:34:31 +00:00
|
|
|
|
2006-07-28 15:13:58 +00:00
|
|
|
optional_policy(`
|
2010-03-12 19:13:28 +00:00
|
|
|
dbus_system_bus_client(firstboot_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
hal_dbus_chat(firstboot_t)
|
|
|
|
')
|
2006-07-28 15:13:58 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-17 14:14:07 +00:00
|
|
|
nis_use_ypbind(firstboot_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-19 14:18:48 +00:00
|
|
|
samba_rw_config(firstboot_t)
|
|
|
|
')
|
|
|
|
|
2007-10-02 16:04:50 +00:00
|
|
|
optional_policy(`
|
|
|
|
unconfined_domtrans(firstboot_t)
|
2008-08-20 19:45:39 +00:00
|
|
|
# The big hammer
|
|
|
|
unconfined_domain(firstboot_t)
|
2007-10-02 16:04:50 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-20 20:48:17 +00:00
|
|
|
usermanage_domtrans_chfn(firstboot_t)
|
2005-09-15 15:34:31 +00:00
|
|
|
usermanage_domtrans_groupadd(firstboot_t)
|
2005-09-20 20:48:17 +00:00
|
|
|
usermanage_domtrans_passwd(firstboot_t)
|
|
|
|
usermanage_domtrans_useradd(firstboot_t)
|
2006-09-04 15:15:35 +00:00
|
|
|
usermanage_domtrans_admin_passwd(firstboot_t)
|
2005-09-15 15:34:31 +00:00
|
|
|
')
|
|
|
|
|
2008-09-12 15:54:11 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_rw_shm(firstboot_t)
|
2008-10-02 17:32:03 +00:00
|
|
|
xserver_unconfined(firstboot_t)
|
2008-09-12 15:54:11 +00:00
|
|
|
')
|