|
Chris PeBenito |
31b7c0 |
#DESC X print server
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Author: Russell Coker <russell@coker.com.au>
|
|
Chris PeBenito |
31b7c0 |
# X-Debian-Packages: xprt-xprintorg
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#################################
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Rules for the xprint_t domain.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# xprint_exec_t is the type of the xprint executable.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
daemon_domain(xprint)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow initrc_t readable_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
allow initrc_t fonts_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t var_lib_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t fonts_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t fonts_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t { bin_t sbin_t }:dir search;
|
|
Chris PeBenito |
31b7c0 |
can_exec(xprint_t, { bin_t sbin_t ls_exec_t shell_exec_t })
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t bin_t:lnk_file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t tmp_t:dir { getattr search };
|
|
Chris PeBenito |
31b7c0 |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t xdm_xserver_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t xdm_xserver_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Use the network.
|
|
Chris PeBenito |
31b7c0 |
can_network_server(xprint_t)
|
|
Chris PeBenito |
31b7c0 |
can_ypbind(xprint_t)
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t proc_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t self:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# read config files
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t { etc_t etc_runtime_t }:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
ifdef(`cups.te', `
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t cupsd_etc_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t cupsd_etc_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
r_dir_file(xprint_t, usr_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow xprint_t urandom_device_t:chr_file { getattr read };
|