Skip to content

Commit a1ab3fa

Browse files
committed
Add new setup test to packit which checking AVC
Add new setup test to packit which checking AVC. Also add local dontaudit module to hide AVC, which are not related with keylime. Allow for keylime domain attribute execute gpg in the caller domain.
1 parent 0fb0aee commit a1ab3fa

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

keylime.te

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ userdom_exec_user_tmp_files(keylime_domain)
6161
userdom_manage_user_tmp_dirs(keylime_domain)
6262
userdom_manage_user_tmp_files(keylime_domain)
6363

64+
optional_policy(`
65+
gpg_exec(keylime_domain)
66+
')
67+
6468
########################################
6569
#
6670
# keylime server policy
@@ -74,10 +78,6 @@ manage_files_pattern(keylime_server_t, keylime_log_t, keylime_log_t)
7478

7579
fs_rw_inherited_tmpfs_files(keylime_server_t)
7680

77-
optional_policy(`
78-
gpg_exec(keylime_server_t)
79-
')
80-
8181
optional_policy(`
8282
kerberos_read_config(keylime_server_t)
8383
kerberos_read_keytab(keylime_server_t)

local_dontaudit.te

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
policy_module(local_dontaudit, 1.0)
2+
require {
3+
type systemd_gpt_generator_t;
4+
type syslogd_t;
5+
type var_log_t;
6+
type fixed_disk_device_t;
7+
}
8+
9+
10+
11+
dontaudit syslogd_t var_log_t:file { relabelfrom relabelto };
12+
dontaudit systemd_gpt_generator_t systemd_gpt_generator_t:capability sys_admin;
13+
dontaudit systemd_gpt_generator_t fixed_disk_device_t:blk_file write;

packit-ci.fmf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
- semodule -i keylime.pp
1818
- restorecon -R /usr/bin/ /usr/local/bin/ /var/lib/ /var/log/
1919
- rm -f /etc/yum.repos.d/tag-repository.repo
20+
- make -f /usr/share/selinux/devel/Makefile local_dontaudit.pp
21+
- semodule -i local_dontaudit.pp
2022

2123
discover:
2224
how: fmf
@@ -30,6 +32,7 @@
3032
- /functional/basic-attestation-on-localhost
3133
# now change IMA policy to signing and run all tests
3234
- /setup/configure_kernel_ima_module/ima_policy_signing
35+
- /setup/inject_SELinux_AVC_check
3336
- /functional/basic-attestation-on-localhost
3437
- /functional/basic-attestation-with-custom-certificates
3538
- /functional/basic-attestation-with-ima-signatures

0 commit comments

Comments
 (0)