Add interfaces to control ntpd_unit_t systemd services
Signed-off-by: Dave Sugar <dsugar@tresys.com>
This commit is contained in:
parent
cd4be3dcd0
commit
5deea1b940
@ -177,6 +177,69 @@ interface(`ntp_rw_shm',`
|
||||
fs_search_tmpfs($1)
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Allow specified domain to enable/disable ntpd unit
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`ntp_enabledisable',`
|
||||
ifdef(`init_systemd',`
|
||||
gen_require(`
|
||||
type ntpd_unit_t;
|
||||
class service { enable disable };
|
||||
')
|
||||
|
||||
allow $1 ntpd_unit_t:service { enable disable };
|
||||
')
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Allow specified domain to start/stop ntpd unit
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`ntp_startstop',`
|
||||
ifdef(`init_systemd',`
|
||||
gen_require(`
|
||||
type ntpd_unit_t;
|
||||
class service { start stop };
|
||||
')
|
||||
|
||||
allow $1 ntpd_unit_t:service { start stop };
|
||||
')
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Allow specified domain to get status of ntpd unit
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`ntp_status',`
|
||||
ifdef(`init_systemd',`
|
||||
gen_require(`
|
||||
type ntpd_unit_t;
|
||||
class service status;
|
||||
')
|
||||
|
||||
allow $1 ntpd_unit_t:service status;
|
||||
')
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## All of the rules required to
|
||||
|
Loading…
Reference in New Issue
Block a user