|
Chris PeBenito |
17de1b |
## <summary>Line printer daemon</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role access for lpd
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## User domain for the role
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`lpd_role',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type lpr_t, lpr_exec_t, print_spool_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
role $1 types lpr_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Transition from the user domain to the derived domain.
|
|
Chris PeBenito |
296273 |
domtrans_pattern($2, lpr_exec_t, lpr_t)
|
|
Chris PeBenito |
296273 |
dontaudit lpr_t $2:unix_stream_socket { read write };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
ps_process_pattern($2, lpr_t)
|
|
Chris PeBenito |
296273 |
allow $2 lpr_t:process signull;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
cups_read_config($2)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute lpd in the lpd domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`lpd_domtrans_checkpc',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type checkpc_t, checkpc_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domtrans_pattern($1, checkpc_exec_t, checkpc_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute amrecover in the lpd domain, and
|
|
Chris PeBenito |
17de1b |
## allow the specified role the lpd domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="role">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The role to be allowed the lpd domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`lpd_run_checkpc',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type checkpc_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
lpd_domtrans_checkpc($1)
|
|
Chris PeBenito |
17de1b |
role $2 types checkpc_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## List the contents of the printer spool directories.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`lpd_list_spool',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type print_spool_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_spool($1)
|
|
Chris PeBenito |
17de1b |
allow $1 print_spool_t:dir list_dir_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
226c06 |
## Read the printer spool files.
|
|
Chris PeBenito |
226c06 |
## </summary>
|
|
Chris PeBenito |
226c06 |
## <param name="domain">
|
|
Chris PeBenito |
226c06 |
## <summary>
|
|
Chris PeBenito |
226c06 |
## Domain allowed access.
|
|
Chris PeBenito |
226c06 |
## </summary>
|
|
Chris PeBenito |
226c06 |
## </param>
|
|
Chris PeBenito |
226c06 |
#
|
|
Chris PeBenito |
226c06 |
interface(`lpd_read_spool',`
|
|
Chris PeBenito |
226c06 |
gen_require(`
|
|
Chris PeBenito |
226c06 |
type print_spool_t;
|
|
Chris PeBenito |
226c06 |
')
|
|
Chris PeBenito |
226c06 |
|
|
Chris PeBenito |
226c06 |
files_search_spool($1)
|
|
Chris PeBenito |
0bfccd |
read_files_pattern($1, print_spool_t, print_spool_t)
|
|
Chris PeBenito |
226c06 |
')
|
|
Chris PeBenito |
226c06 |
|
|
Chris PeBenito |
226c06 |
########################################
|
|
Chris PeBenito |
226c06 |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Create, read, write, and delete printer spool files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`lpd_manage_spool',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type print_spool_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_spool($1)
|
|
Chris PeBenito |
e82895 |
manage_dirs_pattern($1, print_spool_t, print_spool_t)
|
|
Chris PeBenito |
e82895 |
manage_files_pattern($1, print_spool_t, print_spool_t)
|
|
Chris PeBenito |
20272c |
manage_lnk_files_pattern($1, print_spool_t, print_spool_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
d9845a |
## Relabel from and to the spool files.
|
|
Chris PeBenito |
d9845a |
## </summary>
|
|
Chris PeBenito |
d9845a |
## <param name="domain">
|
|
Chris PeBenito |
d9845a |
## <summary>
|
|
Chris PeBenito |
d9845a |
## Domain allowed access.
|
|
Chris PeBenito |
d9845a |
## </summary>
|
|
Chris PeBenito |
d9845a |
## </param>
|
|
Chris PeBenito |
d9845a |
#
|
|
Chris PeBenito |
d9845a |
interface(`lpd_relabel_spool',`
|
|
Chris PeBenito |
d9845a |
gen_require(`
|
|
Chris PeBenito |
d9845a |
type print_spool_t;
|
|
Chris PeBenito |
d9845a |
')
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
files_search_spool($1)
|
|
Chris PeBenito |
d9845a |
allow $1 print_spool_t:file { relabelto relabelfrom };
|
|
Chris PeBenito |
d9845a |
')
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
########################################
|
|
Chris PeBenito |
d9845a |
## <summary>
|
|
Chris PeBenito |
17de1b |
## List the contents of the printer spool directories.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`lpd_read_config',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type printconf_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 printconf_t:dir list_dir_perms;
|
|
Chris PeBenito |
0bfccd |
read_files_pattern($1, printconf_t, printconf_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
ff8f0a |
## Transition to a user lpr domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
ff8f0a |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
template(`lpd_domtrans_lpr',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type lpr_t, lpr_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($1, lpr_exec_t, lpr_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
8a9d6f |
|
|
Chris PeBenito |
8a9d6f |
########################################
|
|
Chris PeBenito |
8a9d6f |
## <summary>
|
|
Chris PeBenito |
8a9d6f |
## Allow the specified domain to execute lpr
|
|
Chris PeBenito |
8a9d6f |
## in the caller domain.
|
|
Chris PeBenito |
8a9d6f |
## </summary>
|
|
Chris PeBenito |
8a9d6f |
## <param name="domain">
|
|
Chris PeBenito |
8a9d6f |
## <summary>
|
|
Chris PeBenito |
8a9d6f |
## Domain allowed access.
|
|
Chris PeBenito |
8a9d6f |
## </summary>
|
|
Chris PeBenito |
8a9d6f |
## </param>
|
|
Chris PeBenito |
8a9d6f |
#
|
|
Chris PeBenito |
8a9d6f |
interface(`lpd_exec_lpr',`
|
|
Chris PeBenito |
8a9d6f |
gen_require(`
|
|
Chris PeBenito |
8a9d6f |
type lpr_exec_t;
|
|
Chris PeBenito |
8a9d6f |
')
|
|
Chris PeBenito |
8a9d6f |
|
|
Chris PeBenito |
8a9d6f |
can_exec($1, lpr_exec_t)
|
|
Chris PeBenito |
8a9d6f |
')
|