2009-08-05 14:59:21 +00:00
|
|
|
policy_module(oddjob, 1.7.0)
|
2006-09-28 14:37:29 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type oddjob_t;
|
|
|
|
type oddjob_exec_t;
|
|
|
|
init_daemon_domain(oddjob_t, oddjob_exec_t)
|
2009-07-27 14:52:20 +00:00
|
|
|
domain_obj_id_change_exemption(oddjob_t)
|
|
|
|
domain_role_change_exemption(oddjob_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
domain_subj_id_change_exemption(oddjob_t)
|
2006-09-28 14:37:29 +00:00
|
|
|
|
|
|
|
type oddjob_mkhomedir_t;
|
|
|
|
type oddjob_mkhomedir_exec_t;
|
2009-07-27 14:52:20 +00:00
|
|
|
domain_obj_id_change_exemption(oddjob_mkhomedir_t)
|
|
|
|
init_system_domain(oddjob_mkhomedir_t, oddjob_mkhomedir_exec_t)
|
2006-09-28 14:37:29 +00:00
|
|
|
oddjob_system_entry(oddjob_mkhomedir_t, oddjob_mkhomedir_exec_t)
|
|
|
|
|
|
|
|
# pid files
|
|
|
|
type oddjob_var_run_t;
|
|
|
|
files_pid_file(oddjob_var_run_t)
|
|
|
|
|
2009-07-27 14:52:20 +00:00
|
|
|
ifdef(`enable_mcs',`
|
|
|
|
init_ranged_daemon_domain(oddjob_t, oddjob_exec_t, s0 - mcs_systemhigh)
|
|
|
|
')
|
|
|
|
|
2006-09-28 14:37:29 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# oddjob local policy
|
|
|
|
#
|
|
|
|
|
2007-06-11 14:09:09 +00:00
|
|
|
allow oddjob_t self:capability setgid;
|
2006-12-04 20:10:56 +00:00
|
|
|
allow oddjob_t self:process { setexec signal };
|
2008-10-16 16:09:20 +00:00
|
|
|
allow oddjob_t self:fifo_file rw_fifo_file_perms;
|
2006-09-28 14:37:29 +00:00
|
|
|
allow oddjob_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(oddjob_t, oddjob_var_run_t, oddjob_var_run_t)
|
|
|
|
manage_sock_files_pattern(oddjob_t, oddjob_var_run_t, oddjob_var_run_t)
|
|
|
|
files_pid_filetrans(oddjob_t, oddjob_var_run_t, { file sock_file })
|
2006-09-28 14:37:29 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(oddjob_t)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
corecmd_exec_bin(oddjob_t)
|
2006-09-28 14:37:29 +00:00
|
|
|
corecmd_exec_shell(oddjob_t)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
mcs_process_set_categories(oddjob_t)
|
|
|
|
|
2006-09-28 14:37:29 +00:00
|
|
|
selinux_compute_create_context(oddjob_t)
|
|
|
|
|
|
|
|
files_read_etc_files(oddjob_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(oddjob_t)
|
|
|
|
|
|
|
|
locallogin_dontaudit_use_fds(oddjob_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(oddjob_t)
|
2006-09-28 14:37:29 +00:00
|
|
|
dbus_connect_system_bus(oddjob_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
unconfined_domtrans(oddjob_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# oddjob_mkhomedir local policy
|
|
|
|
#
|
|
|
|
|
2009-07-27 14:52:20 +00:00
|
|
|
allow oddjob_mkhomedir_t self:capability { chown fowner fsetid dac_override };
|
|
|
|
allow oddjob_mkhomedir_t self:process setfscreate;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow oddjob_mkhomedir_t self:fifo_file rw_fifo_file_perms;
|
2006-09-28 14:37:29 +00:00
|
|
|
allow oddjob_mkhomedir_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
2009-07-27 14:52:20 +00:00
|
|
|
kernel_read_system_state(oddjob_mkhomedir_t)
|
|
|
|
|
2006-09-28 14:37:29 +00:00
|
|
|
files_read_etc_files(oddjob_mkhomedir_t)
|
|
|
|
|
2009-07-27 14:52:20 +00:00
|
|
|
auth_use_nsswitch(oddjob_mkhomedir_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(oddjob_mkhomedir_t)
|
|
|
|
|
2006-09-28 14:37:29 +00:00
|
|
|
miscfiles_read_localization(oddjob_mkhomedir_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2009-07-27 14:52:20 +00:00
|
|
|
selinux_get_fs_mount(oddjob_mkhomedir_t)
|
|
|
|
selinux_validate_context(oddjob_mkhomedir_t)
|
|
|
|
selinux_compute_access_vector(oddjob_mkhomedir_t)
|
|
|
|
selinux_compute_create_context(oddjob_mkhomedir_t)
|
|
|
|
selinux_compute_relabel_context(oddjob_mkhomedir_t)
|
|
|
|
selinux_compute_user_contexts(oddjob_mkhomedir_t)
|
|
|
|
|
|
|
|
seutil_read_config(oddjob_mkhomedir_t)
|
|
|
|
seutil_read_file_contexts(oddjob_mkhomedir_t)
|
|
|
|
seutil_read_default_contexts(oddjob_mkhomedir_t)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
# Add/remove user home directories
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_home_filetrans_user_home_dir(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_user_home_dirs(oddjob_mkhomedir_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_manage_user_home_content_dirs(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_user_home_content(oddjob_mkhomedir_t)
|