selinux-policy/policy/modules/system/sosreport.te
Dan Walsh f5b49a5e0b Allow iptables to read shorewall tmp files
Change chfn and passwd to use auth_use_pam so they can send dbus messages to fprintd
label vlc as an execmem_exec_t
Lots of fixes for mozilla_plugin to run google vidio chat
Allow telepath_msn to execute ldconfig and its own tmp files
Fix labels on hugepages
Allow mdadm to read files on /dev
Remove permissive domains and change back to unconfined
Allow freshclam to execute shell and bin_t
Allow devicekit_power to transition to dhcpc
Add boolean to allow icecast to connect to any port
2010-09-07 16:23:09 -04:00

155 lines
3.8 KiB
Plaintext

policy_module(sosreport,1.0.0)
########################################
#
# Declarations
#
type sosreport_t;
type sosreport_exec_t;
application_domain(sosreport_t, sosreport_exec_t)
role system_r types sosreport_t;
type sosreport_tmp_t;
files_tmp_file(sosreport_tmp_t)
type sosreport_tmpfs_t;
files_tmpfs_file(sosreport_tmpfs_t)
########################################
#
# sosreport local policy
#
allow sosreport_t self:capability { kill net_admin net_raw setuid sys_admin sys_nice sys_ptrace dac_override };
allow sosreport_t self:process { setsched signull };
allow sosreport_t self:fifo_file rw_fifo_file_perms;
allow sosreport_t self:tcp_socket create_stream_socket_perms;
allow sosreport_t self:udp_socket create_socket_perms;
allow sosreport_t self:unix_dgram_socket create_socket_perms;
allow sosreport_t self:netlink_route_socket r_netlink_socket_perms;
allow sosreport_t self:unix_stream_socket create_stream_socket_perms;
# sosreport tmp files
manage_dirs_pattern(sosreport_t, sosreport_tmp_t, sosreport_tmp_t)
manage_files_pattern(sosreport_t, sosreport_tmp_t, sosreport_tmp_t)
manage_lnk_files_pattern(sosreport_t, sosreport_tmp_t, sosreport_tmp_t)
files_tmp_filetrans(sosreport_t, sosreport_tmp_t, { file dir })
manage_files_pattern(sosreport_t, sosreport_tmpfs_t, sosreport_tmpfs_t)
fs_tmpfs_filetrans(sosreport_t, sosreport_tmpfs_t,file)
kernel_read_network_state(sosreport_t)
kernel_read_all_sysctls(sosreport_t)
kernel_read_software_raid_state(sosreport_t)
kernel_search_debugfs(sosreport_t)
kernel_read_messages(sosreport_t)
corecmd_exec_all_executables(sosreport_t)
dev_getattr_all_chr_files(sosreport_t)
dev_getattr_all_blk_files(sosreport_t)
dev_getattr_generic_chr_files(sosreport_t)
dev_getattr_generic_blk_files(sosreport_t)
dev_getattr_mtrr_dev(sosreport_t)
dev_read_rand(sosreport_t)
dev_read_urand(sosreport_t)
dev_read_raw_memory(sosreport_t)
dev_read_sysfs(sosreport_t)
domain_getattr_all_domains(sosreport_t)
domain_read_all_domains_state(sosreport_t)
domain_getattr_all_sockets(sosreport_t)
domain_getattr_all_pipes(sosreport_t)
domain_signull_all_domains(sosreport_t)
# for blkid.tab
files_manage_etc_runtime_files(sosreport_t)
files_etc_filetrans_etc_runtime(sosreport_t, file)
files_getattr_all_sockets(sosreport_t)
files_exec_etc_files(sosreport_t)
files_list_all(sosreport_t)
files_read_config_files(sosreport_t)
files_read_etc_files(sosreport_t)
files_read_generic_tmp_files(sosreport_t)
files_read_usr_files(sosreport_t)
files_read_var_lib_files(sosreport_t)
files_read_var_symlinks(sosreport_t)
files_read_kernel_modules(sosreport_t)
files_read_all_symlinks(sosreport_t)
fs_getattr_all_fs(sosreport_t)
fs_list_inotifyfs(sosreport_t)
# cjp: some config files do not have configfile attribute
# sosreport needs to read various files on system
auth_read_all_files_except_shadow(sosreport_t)
auth_use_nsswitch(sosreport_t)
init_domtrans_script(sosreport_t)
libs_domtrans_ldconfig(sosreport_t)
logging_read_all_logs(sosreport_t)
logging_send_syslog_msg(sosreport_t)
miscfiles_read_localization(sosreport_t)
# needed by modinfo
modutils_read_module_deps(sosreport_t)
sysnet_read_config(sosreport_t)
optional_policy(`
abrt_manage_pid_files(sosreport_t)
')
optional_policy(`
cups_stream_connect(sosreport_t)
')
optional_policy(`
dmesg_domtrans(sosreport_t)
')
optional_policy(`
fstools_domtrans(sosreport_t)
')
optional_policy(`
dbus_system_bus_client(sosreport_t)
optional_policy(`
hal_dbus_chat(sosreport_t)
')
')
optional_policy(`
lvm_domtrans(sosreport_t)
')
optional_policy(`
mount_domtrans(sosreport_t)
')
optional_policy(`
pulseaudio_stream_connect(sosreport_t)
')
optional_policy(`
rpm_exec(sosreport_t)
rpm_dontaudit_manage_db(sosreport_t)
rpm_read_db(sosreport_t)
')
optional_policy(`
xserver_stream_connect(sosreport_t)
')
optional_policy(`
unconfined_domain(sosreport_t)
')