|
37 | 37 | --nogpgcheck --releasever rawhide \ |
38 | 38 | --repofrompath 'kernel-secnext,https://repo.paul-moore.com/rawhide/$basearch' \ |
39 | 39 | kernel-modules-*.secnext.* kernel-devel-*.secnext.* |
| 40 | + |
| 41 | + # add classes/permissions currently not supported in Fedora |
| 42 | + semodule -c -E base |
| 43 | + sed -i \ |
| 44 | + -e 's/\((class system (ipc_info syslog_read syslog_mod syslog_console module_request module_load \)\(halt reboot status start stop enable disable reload undefined ))\)/\1firmware_load kexec_image_load kexec_initramfs_load policy_load x509_certificate_load \2/' \ |
| 45 | + -e 's/\((class netlink_[a-z0-9_]*_socket (\)\(nlmsg_read \)/\1nlmsg \2/' \ |
| 46 | + base.cil |
| 47 | + echo "(policycap netlink_xperm)" >>base.cil |
| 48 | + # allow nlmsg to some system domains so that the system can boot |
| 49 | + for source in daemon initrc_domain systemprocess unconfined_domain_type sysadm_t; do |
| 50 | + echo "(allow $source self (netlink_route_socket (nlmsg)))" >>base.cil |
| 51 | + echo "(allow $source self (netlink_firewall_socket (nlmsg)))" >>base.cil |
| 52 | + echo "(allow $source self (netlink_tcpdiag_socket (nlmsg)))" >>base.cil |
| 53 | + echo "(allow $source self (netlink_xfrm_socket (nlmsg)))" >>base.cil |
| 54 | + echo "(allow $source self (netlink_audit_socket (nlmsg)))" >>base.cil |
| 55 | + echo "(allow $source self (netlink_ip6fw_socket (nlmsg)))" >>base.cil |
| 56 | + done |
| 57 | + semodule -X 456 -i base.cil |
| 58 | + rm -f base.cil |
| 59 | + sed -i.orig \ |
| 60 | + -e 's/module_load /module_load firmware_load kexec_image_load kexec_initramfs_load policy_load x509_certificate_load /' \ |
| 61 | + -e 's/nlmsg_read /nlmsg nlmsg_read /' \ |
| 62 | + /usr/share/selinux/devel/include/support/all_perms.spt |
40 | 63 | ;; |
41 | 64 | local) |
42 | 65 | # for a non-rpm directly-installed kernel - assume all necessary files |
|
100 | 123 | - jfsutils |
101 | 124 | - dosfstools |
102 | 125 | - rdma-core-devel |
| 126 | + - kexec-tools |
103 | 127 | /main: |
104 | 128 | summary: Run the testsuite |
105 | 129 | duration: 20m |
|
139 | 163 | semanage boolean --modify --off ssh_sysadm_login |
140 | 164 | semanage login --modify -s unconfined_u root |
141 | 165 | fi |
| 166 | + if [ "$STS_KERNEL" = secnext ]; then |
| 167 | + semodule -X 456 -r base |
| 168 | + env -C /usr/share/selinux/devel/include/support mv all_perms.spt.orig all_perms.spt |
| 169 | + fi |
0 commit comments