2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Service for handling smart card readers.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send null signals to openct.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_signull',`
|
|
|
|
gen_require(`
|
|
|
|
type openct_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 openct_t:process signull;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute openct in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2021-06-30 08:03:44 +00:00
|
|
|
## <summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## Domain allowed access.
|
2021-06-30 08:03:44 +00:00
|
|
|
## </summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_exec',`
|
|
|
|
gen_require(`
|
2020-01-21 19:25:52 +00:00
|
|
|
type openct_exec_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
can_exec($1, openct_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run openct.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2021-06-30 08:03:44 +00:00
|
|
|
## <summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## Domain allowed to transition.
|
2021-06-30 08:03:44 +00:00
|
|
|
## </summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type openct_t, openct_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, openct_exec_t, openct_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read openct pid files. (Deprecated)
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_read_pid_files',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use openct_read_runtime_files() instead.')
|
|
|
|
openct_read_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read openct runtime files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_read_runtime_files',`
|
2018-06-23 13:00:56 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type openct_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
read_files_pattern($1, openct_runtime_t, openct_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to openct over an unix
|
|
|
|
## domain stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openct_stream_connect',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type openct_t, openct_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
stream_connect_pattern($1, openct_runtime_t, openct_runtime_t, openct_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an openct environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`openct_admin',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type openct_t, openct_initrc_exec_t, openct_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 openct_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, openct_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, openct_t, openct_initrc_exec_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, openct_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|