Skip to content

Commit

Permalink
Allow keylime to bind and connect keylime ports
Browse files Browse the repository at this point in the history
Keylime could bind all ports and connect
to all unreserved ports. Set up policy more
strict to bind and connect only ports with
keylime port label and with milter label which
cover some of keylime default ports.
  • Loading branch information
Koncpa committed Jul 14, 2023
1 parent 2dcd889 commit c7e420d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions keylime.te
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ files_var_lib_filetrans(keylime_domain, keylime_var_lib_t, { dir file lnk_file }
corecmd_exec_bin(keylime_domain)

corenet_tcp_bind_generic_node(keylime_domain)
corenet_tcp_bind_all_ports(keylime_domain)
corenet_tcp_connect_all_unreserved_ports(keylime_domain)
corenet_tcp_connect_keylime_port(keylime_domain)
corenet_tcp_bind_keylime_port(keylime_domain)

dev_read_sysfs(keylime_domain)

Expand All @@ -61,6 +61,13 @@ userdom_exec_user_tmp_files(keylime_domain)
userdom_manage_user_tmp_dirs(keylime_domain)
userdom_manage_user_tmp_files(keylime_domain)

#several used default ports for keylime have label as milter_port_t
#use milter_port interfaces to allow connecting of default keylime ports in policy
optional_policy(`
corenet_tcp_bind_milter_port(keylime_domain)
corenet_tcp_connect_milter_port(keylime_domain)
')

optional_policy(`
gpg_exec(keylime_domain)
')
Expand Down

0 comments on commit c7e420d

Please sign in to comment.