2006-09-28 14:37:29 +00:00
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
policy_module(oddjob,1.0.1)
|
2006-09-28 14:37:29 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type oddjob_t;
|
|
|
|
type oddjob_exec_t;
|
|
|
|
domain_type(oddjob_t)
|
|
|
|
init_daemon_domain(oddjob_t, oddjob_exec_t)
|
|
|
|
|
|
|
|
type oddjob_mkhomedir_t;
|
|
|
|
type oddjob_mkhomedir_exec_t;
|
|
|
|
domain_type(oddjob_mkhomedir_t)
|
|
|
|
init_daemon_domain(oddjob_mkhomedir_t, oddjob_mkhomedir_exec_t)
|
|
|
|
oddjob_system_entry(oddjob_mkhomedir_t, oddjob_mkhomedir_exec_t)
|
|
|
|
|
|
|
|
# pid files
|
|
|
|
type oddjob_var_run_t;
|
|
|
|
files_pid_file(oddjob_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# oddjob local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow oddjob_t self:capability { audit_write setgid } ;
|
|
|
|
allow oddjob_t self:process setexec;
|
|
|
|
allow oddjob_t self:fifo_file { read write };
|
|
|
|
allow oddjob_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
allow oddjob_t oddjob_var_run_t:file manage_file_perms;
|
|
|
|
allow oddjob_t oddjob_var_run_t:sock_file manage_file_perms;
|
|
|
|
allow oddjob_t oddjob_var_run_t:dir rw_dir_perms;
|
|
|
|
files_pid_filetrans(oddjob_t,oddjob_var_run_t, { file sock_file })
|
|
|
|
|
|
|
|
kernel_read_system_state(oddjob_t)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
corecmd_exec_sbin(oddjob_t)
|
|
|
|
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)
|
|
|
|
|
|
|
|
libs_use_ld_so(oddjob_t)
|
|
|
|
libs_use_shared_libs(oddjob_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(oddjob_t)
|
|
|
|
|
|
|
|
init_dontaudit_use_fds(oddjob_t)
|
|
|
|
|
|
|
|
locallogin_dontaudit_use_fds(oddjob_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-10-31 21:01:48 +00:00
|
|
|
term_dontaudit_use_console(oddjob_t)
|
2006-09-28 14:37:29 +00:00
|
|
|
term_dontaudit_use_generic_ptys(oddjob_t)
|
|
|
|
term_dontaudit_use_unallocated_ttys(oddjob_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client_template(oddjob,oddjob_t)
|
|
|
|
dbus_send_system_bus(oddjob_t)
|
|
|
|
dbus_connect_system_bus(oddjob_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
unconfined_domtrans(oddjob_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# oddjob_mkhomedir local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow oddjob_mkhomedir_t self:fifo_file { read write };
|
|
|
|
allow oddjob_mkhomedir_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
files_read_etc_files(oddjob_mkhomedir_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(oddjob_mkhomedir_t)
|
|
|
|
libs_use_shared_libs(oddjob_mkhomedir_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(oddjob_mkhomedir_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
# Add/remove user home directories
|
|
|
|
userdom_home_filetrans_generic_user_home_dir(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_generic_user_home_content_dirs(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_generic_user_home_content_files(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_generic_user_home_dirs(oddjob_mkhomedir_t)
|
|
|
|
userdom_manage_staff_home_dirs(oddjob_mkhomedir_t)
|
|
|
|
userdom_generic_user_home_dir_filetrans_generic_user_home_content(oddjob_mkhomedir_t,notdevfile_class_set)
|
|
|
|
|