Chris PeBenito 31b7c0
#DESC XFS - X Font Server
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Authors:  Stephen Smalley <sds@epoch.ncsc.mil> and Timothy Fraser  
Chris PeBenito 31b7c0
#           Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
# X-Debian-Packages: xfs
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#################################
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Rules for the xfs_t domain.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# xfs_t is the domain of the X font server.
Chris PeBenito 31b7c0
# xfs_exec_t is the type of the xfs executable.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
daemon_domain(xfs)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for /tmp/.font-unix/fs7100
Chris PeBenito 31b7c0
ifdef(`distro_debian', `
Chris PeBenito 31b7c0
type xfs_tmp_t, file_type, sysadmfile, tmpfile;
Chris PeBenito 31b7c0
allow xfs_t tmp_t:dir search;
Chris PeBenito 31b7c0
file_type_auto_trans(xfs_t, initrc_tmp_t, xfs_tmp_t, sock_file)
Chris PeBenito 31b7c0
', `
Chris PeBenito 31b7c0
tmp_domain(xfs, `', `{dir sock_file}')
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow xfs_t { etc_t etc_runtime_t }:file { getattr read };
Chris PeBenito 31b7c0
allow xfs_t proc_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow xfs_t self:process setpgid;
Chris PeBenito 31b7c0
can_ypbind(xfs_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use capabilities.
Chris PeBenito 31b7c0
allow xfs_t self:capability { setgid setuid };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Bind to /tmp/.font-unix/fs-1.
Chris PeBenito 31b7c0
allow xfs_t xfs_tmp_t:unix_stream_socket name_bind;
Chris PeBenito 31b7c0
allow xfs_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 31b7c0
allow xfs_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Read fonts
Chris PeBenito 31b7c0
read_fonts(xfs_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Unlink the xfs socket.
Chris PeBenito 31b7c0
allow initrc_t xfs_tmp_t:dir rw_dir_perms;
Chris PeBenito 31b7c0
allow initrc_t xfs_tmp_t:dir rmdir;
Chris PeBenito 31b7c0
allow initrc_t xfs_tmp_t:sock_file { read getattr unlink };
Chris PeBenito 31b7c0
allow initrc_t fonts_t:dir create_dir_perms;
Chris PeBenito 31b7c0
allow initrc_t fonts_t:file create_file_perms;
Chris PeBenito 31b7c0