selinux-policy/refpolicy/policy/modules/services/xfs.te

93 lines
2.0 KiB
Plaintext
Raw Normal View History

2005-11-25 19:09:08 +00:00
policy_module(xfs,1.0.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 { 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;
allow xfs_t xfs_tmp_t:dir create_dir_perms;
allow xfs_t xfs_tmp_t:sock_file create_file_perms;
files_filetrans_tmp(xfs_t, xfs_tmp_t, { sock_file dir })
2005-11-25 19:09:08 +00:00
allow xfs_t xfs_var_run_t:file create_file_perms;
allow xfs_t xfs_var_run_t:dir rw_dir_perms;
files_filetrans_pid(xfs_t,xfs_var_run_t)
2005-11-25 19:09:08 +00:00
# Bind to /tmp/.font-unix/fs-1.
# cjp: I do not believe this has an effect.
allow xfs_t xfs_tmp_t:unix_stream_socket name_bind;
kernel_read_kernel_sysctls(xfs_t)
2005-11-25 19:09:08 +00:00
kernel_read_system_state(xfs_t)
dev_read_sysfs(xfs_t)
fs_getattr_all_fs(xfs_t)
fs_search_auto_mountpoints(xfs_t)
term_dontaudit_use_console(xfs_t)
domain_use_wide_inherit_fd(xfs_t)
files_read_etc_files(xfs_t)
files_read_etc_runtime_files(xfs_t)
init_use_fd(xfs_t)
2006-02-02 21:08:12 +00:00
init_use_script_ptys(xfs_t)
2005-11-25 19:09:08 +00:00
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_fd(xfs_t)
userdom_dontaudit_search_sysadm_home_dir(xfs_t)
ifdef(`distro_debian',`
# for /tmp/.font-unix/fs7100
init_filetrans_script_tmp(xfs_t,xfs_tmp_t,sock_file)
2005-11-25 19:09:08 +00:00
')
ifdef(`targeted_policy',`
2006-02-02 21:08:12 +00:00
term_dontaudit_use_unallocated_ttys(xfs_t)
term_dontaudit_use_generic_ptys(xfs_t)
files_dontaudit_read_root_files(xfs_t)
2005-11-25 19:09:08 +00:00
')
optional_policy(`nis',`
nis_use_ypbind(xfs_t)
')
optional_policy(`selinuxutil',`
seutil_sigchld_newrole(xfs_t)
')
optional_policy(`udev',`
udev_read_db(xfs_t)
')