selinux-policy/policy/modules/services/xfs.te
2007-04-17 13:28:09 +00:00

88 lines
1.8 KiB
Plaintext

policy_module(xfs,1.2.0)
########################################
#
# Declarations
#
type xfs_t;
type xfs_exec_t;
init_daemon_domain(xfs_t,xfs_exec_t)
type xfs_tmp_t;
files_tmp_file(xfs_tmp_t)
type xfs_var_run_t;
files_pid_file(xfs_var_run_t)
########################################
#
# Local policy
#
allow xfs_t self:capability { dac_override setgid setuid };
dontaudit xfs_t self:capability sys_tty_config;
allow xfs_t self:process { signal_perms setpgid };
allow xfs_t self:unix_stream_socket create_stream_socket_perms;
allow xfs_t self:unix_dgram_socket create_socket_perms;
manage_dirs_pattern(xfs_t,xfs_tmp_t,xfs_tmp_t)
manage_sock_files_pattern(xfs_t,xfs_tmp_t,xfs_tmp_t)
files_tmp_filetrans(xfs_t, xfs_tmp_t, { sock_file dir })
manage_files_pattern(xfs_t,xfs_var_run_t,xfs_var_run_t)
files_pid_filetrans(xfs_t,xfs_var_run_t,file)
kernel_read_kernel_sysctls(xfs_t)
kernel_read_system_state(xfs_t)
corecmd_list_bin(xfs_t)
dev_read_sysfs(xfs_t)
dev_read_urand(xfs_t)
dev_read_rand(xfs_t)
fs_getattr_all_fs(xfs_t)
fs_search_auto_mountpoints(xfs_t)
domain_use_interactive_fds(xfs_t)
files_read_etc_files(xfs_t)
files_read_etc_runtime_files(xfs_t)
files_read_usr_files(xfs_t)
auth_use_nsswitch(xfs_t)
libs_use_ld_so(xfs_t)
libs_use_shared_libs(xfs_t)
logging_send_syslog_msg(xfs_t)
miscfiles_read_localization(xfs_t)
miscfiles_read_fonts(xfs_t)
userdom_dontaudit_use_unpriv_user_fds(xfs_t)
userdom_dontaudit_search_sysadm_home_dirs(xfs_t)
xfs_exec(xfs_t)
ifdef(`distro_debian',`
# for /tmp/.font-unix/fs7100
init_script_tmp_filetrans(xfs_t,xfs_tmp_t,sock_file)
')
ifdef(`targeted_policy',`
term_dontaudit_use_unallocated_ttys(xfs_t)
term_dontaudit_use_generic_ptys(xfs_t)
files_dontaudit_read_root_files(xfs_t)
')
optional_policy(`
seutil_sigchld_newrole(xfs_t)
')
optional_policy(`
udev_read_db(xfs_t)
')