Chris PeBenito 3f4188
Chris PeBenito 3f4188
policy_module(xfs,1.0.0)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
########################################
Chris PeBenito 3f4188
#
Chris PeBenito 3f4188
# Declarations
Chris PeBenito 3f4188
#
Chris PeBenito 3f4188
Chris PeBenito 3f4188
type xfs_t;
Chris PeBenito 3f4188
type xfs_exec_t;
Chris PeBenito 3f4188
init_daemon_domain(xfs_t,xfs_exec_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
type xfs_tmp_t;
Chris PeBenito 3f4188
files_tmp_file(xfs_tmp_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
type xfs_var_run_t;
Chris PeBenito 3f4188
files_pid_file(xfs_var_run_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
########################################
Chris PeBenito 3f4188
#
Chris PeBenito 3f4188
# Local policy
Chris PeBenito 3f4188
#
Chris PeBenito 3f4188
Chris PeBenito 3f4188
allow xfs_t self:capability { setgid setuid };
Chris PeBenito 3f4188
dontaudit xfs_t self:capability sys_tty_config;
Chris PeBenito 3f4188
allow xfs_t self:process { signal_perms setpgid };
Chris PeBenito 3f4188
allow xfs_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 3f4188
allow xfs_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 3f4188
Chris PeBenito 3f4188
allow xfs_t xfs_tmp_t:dir create_dir_perms;
Chris PeBenito 3f4188
allow xfs_t xfs_tmp_t:sock_file create_file_perms;
Chris PeBenito 9d5949
files_filetrans_tmp(xfs_t, xfs_tmp_t, { sock_file dir })
Chris PeBenito 3f4188
Chris PeBenito 3f4188
allow xfs_t xfs_var_run_t:file create_file_perms;
Chris PeBenito 3f4188
allow xfs_t xfs_var_run_t:dir rw_dir_perms;
Chris PeBenito 9d5949
files_filetrans_pid(xfs_t,xfs_var_run_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
# Bind to /tmp/.font-unix/fs-1.
Chris PeBenito 3f4188
# cjp: I do not believe this has an effect.
Chris PeBenito 3f4188
allow xfs_t xfs_tmp_t:unix_stream_socket name_bind;
Chris PeBenito 3f4188
Chris PeBenito 3f4188
kernel_read_kernel_sysctl(xfs_t)
Chris PeBenito 3f4188
kernel_read_system_state(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
dev_read_sysfs(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
fs_getattr_all_fs(xfs_t)
Chris PeBenito 3f4188
fs_search_auto_mountpoints(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
term_dontaudit_use_console(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
domain_use_wide_inherit_fd(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
files_read_etc_files(xfs_t)
Chris PeBenito 3f4188
files_read_etc_runtime_files(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
init_use_fd(xfs_t)
Chris PeBenito 3f4188
init_use_script_pty(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
libs_use_ld_so(xfs_t)
Chris PeBenito 3f4188
libs_use_shared_libs(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
logging_send_syslog_msg(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
miscfiles_read_localization(xfs_t)
Chris PeBenito 3f4188
miscfiles_read_fonts(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
userdom_dontaudit_use_unpriv_user_fd(xfs_t)
Chris PeBenito 3f4188
userdom_dontaudit_search_sysadm_home_dir(xfs_t)
Chris PeBenito 3f4188
Chris PeBenito 3f4188
ifdef(`distro_debian',`
Chris PeBenito 3f4188
	# for /tmp/.font-unix/fs7100
Chris PeBenito 9d5949
	init_filetrans_script_tmp(xfs_t,xfs_tmp_t,sock_file)
Chris PeBenito 3f4188
')
Chris PeBenito 3f4188
Chris PeBenito 3f4188
ifdef(`targeted_policy',`
Chris PeBenito 3f4188
	term_dontaudit_use_unallocated_tty(xfs_t)
Chris PeBenito 3f4188
	term_dontaudit_use_generic_pty(xfs_t)
Chris PeBenito 3f4188
	files_dontaudit_read_root_file(xfs_t)
Chris PeBenito 3f4188
')
Chris PeBenito 3f4188
Chris PeBenito 3f4188
optional_policy(`nis',`
Chris PeBenito 3f4188
	nis_use_ypbind(xfs_t)
Chris PeBenito 3f4188
')
Chris PeBenito 3f4188
Chris PeBenito 3f4188
optional_policy(`selinuxutil',`
Chris PeBenito 3f4188
	seutil_sigchld_newrole(xfs_t)
Chris PeBenito 3f4188
')
Chris PeBenito 3f4188
Chris PeBenito 3f4188
optional_policy(`udev',`
Chris PeBenito 3f4188
	udev_read_db(xfs_t)
Chris PeBenito 3f4188
')