Chris PeBenito 23caa6
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito 23caa6
Chris PeBenito 23caa6
policy_module(consoletype, 1.0)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# NB The constraints file has some entries for crond_t, this makes it
Chris PeBenito 23caa6
# different from all other domains...
Chris PeBenito 23caa6
Chris PeBenito 23caa6
########################################
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# Declarations
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type anacron_exec_t;
Chris PeBenito 23caa6
files_make_file(anacron_exec_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Allow system cron jobs to relabel filesystem for restoring file contexts.
Chris PeBenito 23caa6
bool cron_can_relabel false;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type cron_spool_t;
Chris PeBenito 23caa6
files_make_file(cron_spool_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crond_t; #, privmail, privfd, nscd_client_domain
Chris PeBenito 23caa6
type crond_exec_t;
Chris PeBenito 23caa6
domain_make_daemon_domain(crond_t,crond_exec_t)
Chris PeBenito 23caa6
domain_make_file_descriptors_widely_inheritable(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crond_log_t;
Chris PeBenito 0b1af2
logging_make_log_file(crond_log_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crond_tmp_t;
Chris PeBenito 23caa6
files_make_file(crond_tmp_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crond_var_run_t;
Chris PeBenito 23caa6
files_make_file(crond_var_run_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crontab_exec_t;
Chris PeBenito 23caa6
files_make_file(crontab_exec_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type system_cron_spool_t;
Chris PeBenito 23caa6
type system_crond_t; #, privmail, nscd_client_domain;
Chris PeBenito 23caa6
domain_make_daemon_domain(system_crond_t,anacron_exec_t)
Chris PeBenito 23caa6
corecommands_make_shell_entrypoint(system_crond_t)
Chris PeBenito 23caa6
role system_r types system_crond_t;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type system_crond_tmp_t;
Chris PeBenito 23caa6
files_make_file(system_crond_tmp_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
########################################
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# Cron Local policy
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t self:capability { dac_override setgid setuid net_bind_service sys_nice };
Chris PeBenito 23caa6
dontaudit crond_t self:capability { sys_resource sys_tty_config };
Chris PeBenito 23caa6
allow crond_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem dyntransition };
Chris PeBenito 23caa6
allow crond_t self:process setexec;
Chris PeBenito 23caa6
allow crond_t self:fd use;
Chris PeBenito 23caa6
allow crond_t self:fifo_file { read getattr lock ioctl write append };
Chris PeBenito 23caa6
allow crond_t self:unix_dgram_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown };
Chris PeBenito 23caa6
allow crond_t self:unix_stream_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown listen accept };
Chris PeBenito 23caa6
allow crond_t self:unix_dgram_socket sendto;
Chris PeBenito 23caa6
allow crond_t self:unix_stream_socket connectto;
Chris PeBenito 23caa6
allow crond_t self:shm { associate getattr setattr create destroy read write lock unix_read unix_write };
Chris PeBenito 23caa6
allow crond_t self:sem { associate getattr setattr create destroy read write unix_read unix_write };
Chris PeBenito 23caa6
allow crond_t self:msgq { associate getattr setattr create destroy read write enqueue unix_read unix_write };
Chris PeBenito 23caa6
allow crond_t self:msg { send receive };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t crond_log_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t crond_var_run_t:file { getattr create read write append setattr unlink };
Chris PeBenito 23caa6
files_create_daemon_runtime_data(crond_t,crond_var_run_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t crond_tmp_t:dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir };
Chris PeBenito 23caa6
allow crond_t crond_tmp_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 23caa6
files_create_private_tmp_data(crond_t, crond_tmp_t, { file dir })
Chris PeBenito 23caa6
Chris PeBenito 23caa6
kernel_read_kernel_sysctl(crond_t)
Chris PeBenito 23caa6
kernel_read_hardware_state(crond_t)
Chris PeBenito 23caa6
kernel_get_selinuxfs_mount_point(crond_t)
Chris PeBenito 23caa6
kernel_validate_selinux_context(crond_t)
Chris PeBenito 23caa6
kernel_compute_selinux_av(crond_t)
Chris PeBenito 23caa6
kernel_compute_create(crond_t)
Chris PeBenito 23caa6
kernel_compute_relabel(crond_t)
Chris PeBenito 23caa6
kernel_compute_reachable_user_contexts(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
devices_get_pseudorandom_data(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
filesystem_get_all_filesystems_attributes(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
terminal_ignore_use_console(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
init_use_file_descriptors(crond_t)
Chris PeBenito 23caa6
init_script_use_pseudoterminal(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
domain_use_widely_inheritable_file_descriptors(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
files_read_general_system_config(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
libraries_use_dynamic_loader(crond_t)
Chris PeBenito 23caa6
libraries_read_shared_libraries(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
logging_send_system_log_message(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
selinux_read_config(crond_t)
Chris PeBenito 23caa6
selinux_read_default_contexts(crond_t)
Chris PeBenito 23caa6
selinux_newrole_sigchld(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
miscfiles_read_localization(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# need auth_chkpwd to check for locked accounts.
Chris PeBenito 23caa6
authlogin_check_password_transition(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
tunable_policy(`targeted_policy', `
Chris PeBenito 23caa6
terminal_ignore_use_general_physical_terminal(crond_t)
Chris PeBenito 23caa6
terminal_ignore_use_general_pseudoterminal(crond_t)
Chris PeBenito 23caa6
files_ignore_read_rootfs_file(crond_t)
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
optional_policy(`udev.te', `
Chris PeBenito 23caa6
udev_read_database(crond_t)
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
ifdef(`TODO',`
Chris PeBenito 23caa6
allow crond_t proc_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow crond_t proc_t:lnk_file read;
Chris PeBenito 23caa6
dontaudit crond_t unpriv_userdomain:fd use;
Chris PeBenito 23caa6
allow crond_t autofs_t:dir { search getattr };
Chris PeBenito 23caa6
dontaudit crond_t sysadm_home_dir_t:dir search;
Chris PeBenito 23caa6
optional_policy(`rhgb.te', `
Chris PeBenito 23caa6
allow crond_t rhgb_t:process sigchld;
Chris PeBenito 23caa6
allow crond_t rhgb_t:fd use;
Chris PeBenito 23caa6
allow crond_t rhgb_t:fifo_file { read write };
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t unpriv_userdomain:fd use;
Chris PeBenito 23caa6
can_ypbind(crond_t)
Chris PeBenito 23caa6
ifdef(`automount.te', `
Chris PeBenito 23caa6
allow crond_t autofs_t:dir { search getattr };
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# for finding binaries and /bin/sh
Chris PeBenito 23caa6
allow crond_t { bin_t sbin_t }:dir search;
Chris PeBenito 23caa6
allow crond_t { bin_t sbin_t }:lnk_file read;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Read from /var/spool/cron.
Chris PeBenito 23caa6
allow crond_t var_lib_t:dir search;
Chris PeBenito 23caa6
allow crond_t var_spool_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow crond_t cron_spool_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow crond_t cron_spool_t:file r_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t default_t:dir search;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# crond tries to search /root.  Not sure why.
Chris PeBenito 23caa6
allow crond_t sysadm_home_dir_t:dir r_dir_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# to search /home
Chris PeBenito 23caa6
allow crond_t home_root_t:dir { getattr search };
Chris PeBenito 23caa6
allow crond_t user_home_dir_type:dir r_dir_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Run a shell.
Chris PeBenito 23caa6
can_exec(crond_t, shell_exec_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
ifdef(`distro_redhat', `
Chris PeBenito 23caa6
# Run the rpm program in the rpm_t domain. Allow creation of RPM log files
Chris PeBenito 23caa6
# via redirection of standard out.
Chris PeBenito 23caa6
ifdef(`rpm.te', `
Chris PeBenito 23caa6
allow crond_t rpm_log_t: file create_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
system_crond_entry(rpm_exec_t, rpm_t)
Chris PeBenito 23caa6
allow system_crond_t rpm_log_t:file create_file_perms;
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t var_spool_t:file { getattr read };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
Chris PeBenito 23caa6
') dnl endif TODO
Chris PeBenito 23caa6
Chris PeBenito 23caa6
########################################
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# System cron process domain
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t self:capability { dac_override dac_read_search chown setgid setuid fowner net_bind_service fsetid };
Chris PeBenito 23caa6
allow system_crond_t self:process { sigkill sigstop signull signal setsched };
Chris PeBenito 23caa6
allow system_crond_t self:fifo_file { read getattr write append };
Chris PeBenito 23caa6
allow system_crond_t self:passwd rootok;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# The entrypoint interface is not used as this is not
Chris PeBenito 23caa6
# a regular entrypoint.  Since crontab files are
Chris PeBenito 23caa6
# not directly executed, crond must ensure that
Chris PeBenito 23caa6
# the crontab file has a type that is appropriate
Chris PeBenito 23caa6
# for the domain of the user cron job.  It
Chris PeBenito 23caa6
# performs an entrypoint permission check
Chris PeBenito 23caa6
# for this purpose.
Chris PeBenito 23caa6
allow system_crond_t system_cron_spool_t:file entrypoint;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t system_cron_spool_t:file { getattr read };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
kernel_read_kernel_sysctl(system_crond_t)
Chris PeBenito 23caa6
kernel_read_system_state(system_crond_t)
Chris PeBenito 23caa6
kernel_read_software_raid_state(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
corenetwork_network_tcp_on_all_interfaces(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_raw_on_all_interfaces(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_udp_on_all_interfaces(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_tcp_on_all_nodes(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_raw_on_all_nodes(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_udp_on_all_nodes(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_tcp_on_all_ports(system_crond_t)
Chris PeBenito 23caa6
corenetwork_network_udp_on_all_ports(system_crond_t)
Chris PeBenito 23caa6
corenetwork_bind_tcp_on_all_nodes(system_crond_t)
Chris PeBenito 23caa6
corenetwork_bind_udp_on_all_nodes(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
devices_get_all_block_device_attributes(system_crond_t)
Chris PeBenito 23caa6
devices_get_all_character_device_attributes(system_crond_t)
Chris PeBenito 23caa6
devices_get_pseudorandom_data(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
filesystem_get_all_filesystems_attributes(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
init_use_file_descriptors(system_crond_t)
Chris PeBenito 23caa6
init_script_use_file_descriptors(system_crond_t)
Chris PeBenito 23caa6
init_script_use_pseudoterminal(system_crond_t)
Chris PeBenito 23caa6
init_script_read_runtime_data(system_crond_t)
Chris PeBenito 23caa6
init_script_ignore_modify_runtime_data(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
domain_execute_all_entrypoint_programs(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
files_execute_system_config_script(system_crond_t)
Chris PeBenito 23caa6
files_read_general_system_config(system_crond_t)
Chris PeBenito 23caa6
files_read_runtime_system_config(system_crond_t)
Chris PeBenito 23caa6
files_read_all_directories(system_crond_t)
Chris PeBenito 23caa6
files_get_all_file_attributes(system_crond_t)
Chris PeBenito 23caa6
files_read_general_application_resources(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
corecommands_execute_general_programs(system_crond_t)
Chris PeBenito 23caa6
corecommands_execute_system_programs(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
libraries_use_dynamic_loader(system_crond_t)
Chris PeBenito 23caa6
libraries_read_shared_libraries(system_crond_t)
Chris PeBenito 23caa6
libraries_execute_library_scripts(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
logging_read_system_logs(system_crond_t)
Chris PeBenito 23caa6
logging_send_system_log_message(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
miscfiles_read_localization(system_crond_t)
Chris PeBenito 23caa6
miscfiles_read_man_pages(system_crond_t)
Chris PeBenito 23caa6
miscfiles_manage_man_page_cache(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
selinux_read_config(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
if (cron_can_relabel) {
Chris PeBenito 23caa6
selinux_setfiles_transition(system_crond_t)
Chris PeBenito 23caa6
} else {
Chris PeBenito 23caa6
kernel_get_selinuxfs_mount_point(system_crond_t)
Chris PeBenito 23caa6
kernel_validate_selinux_context(system_crond_t)
Chris PeBenito 23caa6
kernel_compute_selinux_av(system_crond_t)
Chris PeBenito 23caa6
kernel_compute_create(system_crond_t)
Chris PeBenito 23caa6
kernel_compute_relabel(system_crond_t)
Chris PeBenito 23caa6
kernel_compute_reachable_user_contexts(system_crond_t)
Chris PeBenito 23caa6
selinux_read_file_contexts(system_crond_t)
Chris PeBenito 23caa6
}
Chris PeBenito 23caa6
Chris PeBenito 23caa6
ifdef(`TODO',`
Chris PeBenito 23caa6
Chris PeBenito 23caa6
ifdef(`fcron.te', `
Chris PeBenito 23caa6
allow crond_t system_cron_spool_t:file create_file_perms;
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Permit a transition from the crond_t domain to this domain.
Chris PeBenito 23caa6
# The transition is requested explicitly by the modified crond 
Chris PeBenito 23caa6
# via execve_secure.  There is no way to set up an automatic
Chris PeBenito 23caa6
# transition, since crontabs are configuration files, not executables.
Chris PeBenito 23caa6
domain_trans(crond_t, shell_exec_t, system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
ifdef(`mta.te', `
Chris PeBenito 23caa6
domain_auto_trans(system_crond_t, sendmail_exec_t, system_mail_t)
Chris PeBenito 23caa6
allow system_crond_t sendmail_exec_t:lnk_file { getattr read };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# system_mail_t should only be reading from the cron fifo not needing to write
Chris PeBenito 23caa6
dontaudit system_mail_t crond_t:fifo_file write;
Chris PeBenito 23caa6
allow mta_user_agent system_crond_t:fd use;
Chris PeBenito 23caa6
allow mta_user_agent system_crond_t:fd use;
Chris PeBenito 23caa6
r_dir_file(system_mail_t, crond_tmp_t)
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# This domain is granted permissions common to most domains.
Chris PeBenito 23caa6
Chris PeBenito 23caa6
can_ypbind(system_crond_t)
Chris PeBenito 23caa6
allow system_crond_t var_spool_t:dir search;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t var_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow system_crond_t var_t:file { getattr read ioctl };
Chris PeBenito 23caa6
Chris PeBenito 23caa6
can_exec(system_crond_t, ld_so_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# ps does not need to access /boot when run from cron
Chris PeBenito 23caa6
dontaudit system_crond_t boot_t:dir search;
Chris PeBenito 23caa6
# quiet other ps operations
Chris PeBenito 23caa6
dontaudit system_crond_t domain:dir { getattr search };
Chris PeBenito 23caa6
# for nscd
Chris PeBenito 23caa6
dontaudit system_crond_t var_run_t:dir search;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t proc_t:filesystem getattr;
Chris PeBenito 23caa6
allow system_crond_t usbdevfs_t:filesystem getattr;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t { sysfs_t rpc_pipefs_t }:dir getattr;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Access log files
Chris PeBenito 23caa6
file_type_auto_trans(system_crond_t, var_log_t, crond_log_t, file)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow crond_t system_cron_spool_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow crond_t system_cron_spool_t:file r_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Read from /var/spool/cron.
Chris PeBenito 23caa6
allow system_crond_t cron_spool_t:dir r_dir_perms;
Chris PeBenito 23caa6
allow system_crond_t cron_spool_t:file r_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Write to /var/lib/slocate.db.
Chris PeBenito 23caa6
allow system_crond_t var_lib_t:dir rw_dir_perms;
Chris PeBenito 23caa6
allow system_crond_t var_lib_t:file create_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Write /var/lock/makewhatis.lock.
Chris PeBenito 23caa6
lock_domain(system_crond)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# for if /var/mail is a symlink
Chris PeBenito 23caa6
allow { system_crond_t crond_t } mail_spool_t:lnk_file read;
Chris PeBenito 23caa6
allow crond_t mail_spool_t:dir search;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Stat any file and search any directory for find.
Chris PeBenito 23caa6
allow system_crond_t fs_type:notdevfile_class_set getattr;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Create temporary files.
Chris PeBenito 23caa6
file_type_auto_trans(system_crond_t, { tmp_t crond_tmp_t }, system_crond_tmp_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Access other spool directories like
Chris PeBenito 23caa6
# /var/spool/anacron and /var/spool/slrnpull.
Chris PeBenito 23caa6
allow system_crond_t var_spool_t:file create_file_perms;
Chris PeBenito 23caa6
allow system_crond_t var_spool_t:dir rw_dir_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# Do not audit attempts to search unlabeled directories (e.g. slocate).
Chris PeBenito 23caa6
dontaudit system_crond_t unlabeled_t:dir r_dir_perms;
Chris PeBenito 23caa6
dontaudit system_crond_t unlabeled_t:file r_file_perms;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# reading /var/spool/cron/mailman
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
allow system_crond_t devpts_t:filesystem getattr;
Chris PeBenito 23caa6
allow system_crond_t sysfs_t:filesystem getattr;
Chris PeBenito 23caa6
allow system_crond_t tmpfs_t:filesystem getattr;
Chris PeBenito 23caa6
allow system_crond_t rpc_pipefs_t:filesystem getattr;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
#  These rules are here to allow system cron jobs to su
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
ifdef(`su.te', `
Chris PeBenito 23caa6
su_restricted_domain(system_crond,system)
Chris PeBenito 23caa6
role system_r types system_crond_su_t;
Chris PeBenito 23caa6
allow system_crond_su_t crond_t:fifo_file ioctl;
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# prelink tells init to restart it self, we either need to allow or dontaudit
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
allow system_crond_t initctl_t:fifo_file write;
Chris PeBenito 23caa6
dontaudit userdomain system_crond_t:fd use;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
allow system_crond_t removable_t:filesystem { getattr };
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# Required for webalizer
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
ifdef(`apache.te', `
Chris PeBenito 23caa6
allow system_crond_t httpd_log_t:file { getattr read };
Chris PeBenito 23caa6
')
Chris PeBenito 23caa6
Chris PeBenito 23caa6
') dnl end TODO