selinux-refpolicy/policy/modules/system/getty.if
cgzones 3c7cec58a2 getty: overlook module
* reorder file contexts
* rename getty_var_run_t into getty_runtime_t and getty_etc_t into getty_conf_t
* remove unneeded and confusing init permissions
* delete access on generic pids
* remove invalid etc filetrans: getty has no create permissions for its config files
* restrict logfile access
2017-02-27 19:21:39 +01:00

99 lines
1.8 KiB
Plaintext

## <summary>Manages physical or virtual terminals.</summary>
########################################
## <summary>
## Execute gettys in the getty domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`getty_domtrans',`
gen_require(`
type getty_t, getty_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, getty_exec_t, getty_t)
')
########################################
## <summary>
## Inherit and use getty file descriptors.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`getty_use_fds',`
gen_require(`
type getty_t;
')
allow $1 getty_t:fd use;
')
########################################
## <summary>
## Allow process to read getty log file.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`getty_read_log',`
gen_require(`
type getty_log_t;
')
logging_search_logs($1)
allow $1 getty_log_t:file read_file_perms;
')
########################################
## <summary>
## Allow process to read getty config file.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`getty_read_config',`
gen_require(`
type getty_conf_t;
')
files_search_etc($1)
allow $1 getty_conf_t:file read_file_perms;
')
########################################
## <summary>
## Allow process to edit getty config file.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`getty_rw_config',`
gen_require(`
type getty_conf_t;
')
files_search_etc($1)
allow $1 getty_conf_t:file rw_file_perms;
')