2020-05-14 14:32:30 +00:00
|
|
|
policy_module(tpm2, 1.1.2)
|
2019-08-05 19:13:02 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type tpm2_abrmd_t;
|
|
|
|
type tpm2_abrmd_exec_t;
|
|
|
|
init_daemon_domain(tpm2_abrmd_t, tpm2_abrmd_exec_t)
|
|
|
|
|
|
|
|
type tpm2_abrmd_unit_t;
|
|
|
|
init_unit_file(tpm2_abrmd_unit_t)
|
|
|
|
|
2020-03-29 00:21:33 +00:00
|
|
|
type tpm2_t;
|
|
|
|
type tpm2_exec_t;
|
|
|
|
application_domain(tpm2_t, tpm2_exec_t)
|
|
|
|
|
2019-08-05 19:13:02 +00:00
|
|
|
########################################
|
|
|
|
#
|
2020-03-29 00:21:33 +00:00
|
|
|
# tpm2-abrmd local policy
|
2019-08-05 19:13:02 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
allow tpm2_abrmd_t self:process signal;
|
|
|
|
allow tpm2_abrmd_t self:unix_stream_socket create_socket_perms;
|
2020-03-29 00:21:33 +00:00
|
|
|
allow tpm2_abrmd_t self:fifo_file { read write };
|
2019-08-05 19:13:02 +00:00
|
|
|
|
|
|
|
dev_rw_tpm(tpm2_abrmd_t)
|
|
|
|
|
|
|
|
kernel_read_crypto_sysctls(tpm2_abrmd_t)
|
|
|
|
kernel_read_system_state(tpm2_abrmd_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_domain(tpm2_abrmd_t, tpm2_abrmd_exec_t)
|
|
|
|
')
|
2020-03-29 00:21:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
###########################################
|
|
|
|
# tpm2_* local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow tpm2_t self:unix_stream_socket create_socket_perms;
|
|
|
|
allow tpm2_t self:capability dac_override;
|
|
|
|
|
|
|
|
dev_rw_tpm(tpm2_t)
|
|
|
|
|
|
|
|
files_read_etc_files(tpm2_t)
|
|
|
|
|
|
|
|
kernel_read_crypto_sysctls(tpm2_t)
|
|
|
|
kernel_read_system_state(tpm2_t)
|
|
|
|
|
|
|
|
miscfiles_read_generic_certs(tpm2_t)
|
|
|
|
|
|
|
|
selinux_getattr_fs(tpm2_t)
|
|
|
|
selinux_search_fs(tpm2_t)
|
|
|
|
|
|
|
|
tpm2_dbus_chat_abrmd(tpm2_t)
|
|
|
|
tpm2_rw_abrmd_pipes(tpm2_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client(tpm2_t)
|
|
|
|
')
|