Blame SOURCES/keylime.te

625400
policy_module(keylime, 1.0.0)
625400
625400
########################################
625400
#
625400
# Declarations
625400
#
625400
625400
attribute keylime_domain;
625400
625400
type keylime_agent_t;
625400
keylime_use_keylime_domain(keylime_agent_t)
625400
type keylime_agent_exec_t;
625400
init_daemon_domain(keylime_agent_t, keylime_agent_exec_t)
625400
625400
type keylime_server_t;
625400
keylime_use_keylime_domain(keylime_server_t)
625400
type keylime_server_exec_t;
625400
init_daemon_domain(keylime_server_t, keylime_server_exec_t)
625400
625400
type keylime_log_t;
625400
logging_log_file(keylime_log_t)
625400
625400
type keylime_var_lib_t;
625400
files_type(keylime_var_lib_t)
625400
625400
type keylime_tmp_t;
625400
files_tmp_file(keylime_tmp_t)
625400
625400
########################################
625400
#
625400
# keylime domain policy
625400
#
625400
625400
allow keylime_domain self:tcp_socket create_stream_socket_perms;
625400
625400
manage_dirs_pattern(keylime_domain, keylime_tmp_t, keylime_tmp_t)
625400
manage_files_pattern(keylime_domain, keylime_tmp_t, keylime_tmp_t)
625400
files_tmp_filetrans(keylime_domain, keylime_tmp_t, { dir file })
625400
625400
manage_dirs_pattern(keylime_domain, keylime_var_lib_t, keylime_var_lib_t)
625400
manage_files_pattern(keylime_domain, keylime_var_lib_t, keylime_var_lib_t)
625400
files_var_lib_filetrans(keylime_domain, keylime_var_lib_t, { dir file lnk_file })
625400
625400
corecmd_exec_bin(keylime_domain)
625400
625400
corenet_tcp_bind_generic_node(keylime_domain)
625400
corenet_tcp_bind_all_ports(keylime_domain)
625400
corenet_tcp_connect_all_unreserved_ports(keylime_domain)
625400
625400
dev_read_sysfs(keylime_domain)
625400
625400
fs_tmpfs_filetrans(keylime_domain, keylime_var_lib_t, { dir file })
625400
625400
init_named_socket_activation(keylime_domain, keylime_var_lib_t, "keylime")
625400
625400
miscfiles_read_generic_certs(keylime_domain)
625400
625400
sysnet_read_config(keylime_domain)
625400
625400
userdom_exec_user_tmp_files(keylime_domain)
625400
userdom_manage_user_tmp_dirs(keylime_domain)
625400
userdom_manage_user_tmp_files(keylime_domain)
625400
625400
########################################
625400
#
625400
# keylime server policy
625400
#
625400
625400
allow keylime_server_t self:netlink_route_socket { create_stream_socket_perms nlmsg_read };
625400
allow keylime_server_t self:udp_socket create_stream_socket_perms;
625400
625400
manage_dirs_pattern(keylime_server_t, keylime_log_t, keylime_log_t)
625400
manage_files_pattern(keylime_server_t, keylime_log_t, keylime_log_t)
625400
625400
fs_rw_inherited_tmpfs_files(keylime_server_t)
625400
625400
optional_policy(`
625400
        gpg_exec(keylime_server_t)
625400
')
625400
625400
optional_policy(`
625400
        kerberos_read_config(keylime_server_t)
625400
        kerberos_read_keytab(keylime_server_t)
625400
')
625400
625400
optional_policy(`
625400
        sssd_run_stream_connect(keylime_server_t)
625400
')
625400
625400
625400
########################################
625400
#
625400
# keylime agent policy
625400
#
625400
#work with /var/lib/keylime/secure
625400
allow keylime_agent_t self:capability { chown dac_override dac_read_search setgid setuid sys_nice sys_ptrace };
625400
allow keylime_agent_t self:chr_file getattr;
625400
625400
#FIX ME, add to tabrmd policy interface related with this
625400
allow keylime_agent_t domain:unix_stream_socket rw_stream_socket_perms; #selint-disable:W-001
625400
625400
dev_rw_tpm(keylime_agent_t)
625400
625400
exec_files_pattern(keylime_agent_t, keylime_var_lib_t, keylime_var_lib_t)
625400
files_read_var_lib_files(keylime_agent_t)
625400
625400
fs_dontaudit_search_cgroup_dirs(keylime_agent_t)
625400
fs_getattr_cgroup(keylime_agent_t)
625400
fs_mount_tmpfs(keylime_agent_t)
625400
fs_setattr_tmpfs_dirs(keylime_agent_t)
625400
625400
init_dontaudit_stream_connect(keylime_agent_t)
625400
625400
kernel_read_all_proc(keylime_agent_t)
625400
625400
userdom_dontaudit_search_user_home_dirs(keylime_agent_t)
625400
625400
auth_read_passwd(keylime_agent_t)
625400
625400
keylime_mounton_var_lib(keylime_agent_t)
625400
625400
mount_domtrans(keylime_agent_t)
625400
625400
selinux_read_policy(keylime_agent_t)
625400
625400
optional_policy(`
625400
        #FIX ME, add to tabrmd policy interface related with this
625400
        #https://github.com/tpm2-software/tpm2-abrmd/blob/master/selinux
625400
        dbus_chat_system_bus(keylime_agent_t)
625400
')
625400
625400
optional_policy(`
625400
        dbus_stream_connect_system_dbusd(keylime_agent_t)
625400
        dbus_system_bus_client(keylime_agent_t)
625400
')
625400
625400
optional_policy(`
625400
        systemd_userdbd_stream_connect(keylime_agent_t)
625400
        systemd_machined_stream_connect(keylime_agent_t)
625400
')