Chris PeBenito 23caa6
Chris PeBenito 3b857e
policy_module(cron, 1.0)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
########################################
Chris PeBenito 23caa6
#
Chris PeBenito 23caa6
# Declarations
Chris PeBenito 23caa6
#
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 3b3bf8
type anacron_exec_t;
Chris PeBenito 3b3bf8
files_make_file(anacron_exec_t)
Chris PeBenito 3b3bf8
Chris PeBenito 23caa6
type cron_spool_t;
Chris PeBenito 23caa6
files_make_file(cron_spool_t)
Chris PeBenito 23caa6
Chris PeBenito 075c4f
type crond_t; #, privmail, nscd_client_domain
Chris PeBenito 23caa6
type crond_exec_t;
Chris PeBenito ff3138
init_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 38e24a
files_make_temporary_file(crond_tmp_t)
Chris PeBenito 23caa6
Chris PeBenito 23caa6
type crond_var_run_t;
Chris PeBenito d25dd9
files_make_daemon_runtime_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 ff3138
init_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 075c4f
type system_crond_lock_t;
Chris PeBenito 075c4f
files_make_lock_file(system_crond_lock_t)
Chris PeBenito 075c4f
Chris PeBenito 23caa6
type system_crond_tmp_t;
Chris PeBenito 38e24a
files_make_temporary_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 3b857e
allow crond_t crond_var_run_t:file create_file_perms;
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 7bba9d
allow crond_t cron_spool_t:dir { getattr search read };
Chris PeBenito 7bba9d
allow crond_t cron_spool_t:file { getattr read };
Chris PeBenito 075c4f
allow crond_t system_cron_spool_t:dir { getattr search read };
Chris PeBenito 075c4f
allow crond_t system_cron_spool_t:file { getattr read };
Chris PeBenito 075c4f
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 178607
kernel_compute_selinux_access_vector(crond_t)
Chris PeBenito 178607
kernel_compute_selinux_create_context(crond_t)
Chris PeBenito 178607
kernel_compute_selinux_relabel_context(crond_t)
Chris PeBenito 178607
kernel_compute_selinux_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 efd8ed
# need auth_chkpwd to check for locked accounts.
Chris PeBenito efd8ed
authlogin_check_password_transition(crond_t)
Chris PeBenito efd8ed
Chris PeBenito efd8ed
corecommands_execute_shell(crond_t)
Chris PeBenito efd8ed
corecommands_read_system_programs_directory(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 efd8ed
files_read_system_spools(crond_t)
Chris PeBenito 23caa6
Chris PeBenito efd8ed
init_use_file_descriptors(crond_t)
Chris PeBenito efd8ed
init_script_use_pseudoterminal(crond_t)
Chris PeBenito 075c4f
Chris PeBenito 23caa6
libraries_use_dynamic_loader(crond_t)
Chris PeBenito dd14d0
libraries_use_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 efd8ed
userdomain_use_all_unprivileged_users_file_descriptors(crond_t)
Chris PeBenito 23caa6
Chris PeBenito 075c4f
tunable_policy(`fcron_crond', `
Chris PeBenito 075c4f
allow crond_t system_cron_spool_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
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 075c4f
# NB The constraints file has some entries for crond_t, this makes it
Chris PeBenito 075c4f
# different from all other domains...
Chris PeBenito 075c4f
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 075c4f
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
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
# Read from /var/spool/cron.
Chris PeBenito 23caa6
allow crond_t var_lib_t:dir search;
Chris PeBenito 7bba9d
allow crond_t mail_spool_t:dir search;
Chris PeBenito efd8ed
# for if /var/mail is a symlink
Chris PeBenito efd8ed
allow crond_t mail_spool_t:lnk_file read;
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 user_home_dir_type:dir r_dir_perms;
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
') 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 075c4f
# Permit a transition from the crond_t domain to this domain.
Chris PeBenito 075c4f
# The transition is requested explicitly by the modified crond 
Chris PeBenito 075c4f
# via setexeccon.  There is no way to set up an automatic
Chris PeBenito 075c4f
# transition, since crontabs are configuration files, not executables.
Chris PeBenito 075c4f
allow crond_t system_crond_t:process transition;
Chris PeBenito 075c4f
dontaudit crond_t system_crond_t:process { noatsecure siginh rlimitinh };
Chris PeBenito f5d4ef
allow crond_t system_crond_t:fd use;
Chris PeBenito f5d4ef
allow system_crond_t crond_t:fd use;
Chris PeBenito f5d4ef
allow system_crond_t crond_t:fifo_file rw_file_perms;
Chris PeBenito f5d4ef
allow system_crond_t crond_t:process sigchld;
Chris PeBenito 075c4f
Chris PeBenito 075c4f
# Write /var/lock/makewhatis.lock.
Chris PeBenito 075c4f
allow system_crond_t system_crond_lock_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 075c4f
files_create_private_lock_file(system_crond_t,system_crond_lock_t)
Chris PeBenito 075c4f
Chris PeBenito 075c4f
# write temporary files
Chris PeBenito 075c4f
allow system_crond_t system_crond_tmp_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 075c4f
files_create_private_tmp_data(system_crond_t,system_crond_tmp_t)
Chris PeBenito 075c4f
Chris PeBenito 075c4f
# write temporary files in crond tmp dir:
Chris PeBenito 075c4f
allow system_crond_t crond_tmp_t:dir { getattr search read write add_name remove_name };
Chris PeBenito 075c4f
type_transition system_crond_t crond_tmp_t:file system_crond_tmp_t;
Chris PeBenito 075c4f
Chris PeBenito 075c4f
# Read from /var/spool/cron.
Chris PeBenito 075c4f
allow system_crond_t cron_spool_t:dir { getattr search read };
Chris PeBenito 075c4f
allow system_crond_t cron_spool_t:file { getattr read };
Chris PeBenito 075c4f
Chris PeBenito 075c4f
# Access crond log files
Chris PeBenito 075c4f
allow system_crond_t crond_log_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 075c4f
logging_create_private_log(system_crond_t,crond_log_t)
Chris PeBenito 075c4f
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 075c4f
# ps does not need to access /boot when run from cron
Chris PeBenito 075c4f
bootloader_ignore_search_bootloader_data_directory(system_crond_t)
Chris PeBenito 075c4f
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 075c4f
filesystem_get_all_file_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 075c4f
# for nscd:
Chris PeBenito 075c4f
files_ignore_search_runtime_data_directory(system_crond_t)
Chris PeBenito efd8ed
# Access other spool directories like
Chris PeBenito efd8ed
# /var/spool/anacron and /var/spool/slrnpull.
Chris PeBenito efd8ed
files_manage_system_spools(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 dd14d0
libraries_use_shared_libraries(system_crond_t)
Chris PeBenito 23caa6
libraries_execute_library_scripts(system_crond_t)
Chris PeBenito 075c4f
libraries_execute_dynamic_loader(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 178607
kernel_compute_selinux_access_vector(system_crond_t)
Chris PeBenito 178607
kernel_compute_selinux_create_context(system_crond_t)
Chris PeBenito 178607
kernel_compute_selinux_relabel_context(system_crond_t)
Chris PeBenito 178607
kernel_compute_selinux_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
can_ypbind(system_crond_t)
Chris PeBenito 23caa6
Chris PeBenito 7bba9d
dontaudit userdomain system_crond_t:fd use;
Chris PeBenito 23caa6
Chris PeBenito 23caa6
# quiet other ps operations
Chris PeBenito 23caa6
dontaudit system_crond_t domain:dir { getattr search };
Chris PeBenito 23caa6
Chris PeBenito 7bba9d
# Do not audit attempts to search unlabeled directories (e.g. slocate).
Chris PeBenito 7bba9d
dontaudit system_crond_t unlabeled_t:dir r_dir_perms;
Chris PeBenito 7bba9d
dontaudit system_crond_t unlabeled_t:file r_file_perms;
Chris PeBenito 7bba9d
Chris PeBenito 23caa6
allow system_crond_t { sysfs_t rpc_pipefs_t }:dir getattr;
Chris PeBenito 23caa6
Chris PeBenito 7bba9d
# prelink tells init to restart it self, we either need to allow or dontaudit
Chris PeBenito 7bba9d
allow system_crond_t initctl_t:fifo_file write;
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
allow system_crond_t var_t:dir r_dir_perms;
Chris PeBenito 7bba9d
allow system_crond_t var_t:file { getattr read ioctl };
Chris PeBenito 7bba9d
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 7bba9d
# for if /var/mail is a symlink
Chris PeBenito 7bba9d
allow system_crond_t mail_spool_t:lnk_file read;
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
# 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 075c4f
tunable_policy(`distro_redhat', `
Chris PeBenito 075c4f
optional_policy(`rpm.te', `
Chris PeBenito 075c4f
allow system_crond_t rpm_log_t:file create_file_perms;
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
Chris PeBenito 7bba9d
ifdef(`mta.te', `
Chris PeBenito 7bba9d
mta_send_mail_transition(system_crond_t)
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
# system_mail_t should only be reading from the cron fifo not needing to write
Chris PeBenito 7bba9d
dontaudit system_mail_t crond_t:fifo_file write;
Chris PeBenito 7bba9d
allow mta_user_agent system_crond_t:fd use;
Chris PeBenito 7bba9d
r_dir_file(system_mail_t, crond_tmp_t)
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 23caa6
') dnl end TODO