computerの日記

Cisco,SHELL,C,Qt,C++,Linux,ネットワーク,Windows Scriptなどの発言です

SELinux を頑張る-その2

では、strict ポリシに近づけていきます。

ところで、<user> ユーザーが、wheel グループに入ったままなので、抜きます。
以下のコマンドにより可能です。

# gpasswd -d <user> group

では、実行します。

# gpasswd -d <user> wheel

まずは、unconfined モジュールを削除します。

uncnofined モジュール削除の前に、unconfined_domain_type が幾つあるか確認して
おきます。

# seinfo -a unconfined_domain_type -x | wc -l
88

では、削除します。

# semodule -d unconfined

もう一度確認します。

# seinfo -a unconfined_domain_type -x | wc -l
18

かなり減っています。
何が削除されたのかを確認します。

$ diff -ruNp seinfo_-a_unconfined_domain_type_-x seinfo_-a_unconfined_domain_type_-x__after_semodule_-d_unconfined
--- seinfo_-a_unconfined_domain_type_-x 2018-09-24 12:16:34.268464049 +0900
+++ seinfo_-a_unconfined_domain_type_-x__after_semodule_-d_unconfined 2018-09-24 12:16:34.269464030 +0900
@@ -1,88 +1,18 @@

Type Attributes: 1
attribute unconfined_domain_type;
- abrt_handle_event_t
anaconda_t
authconfig_t
- bacula_unconfined_script_t
- boinc_project_t
- bootloader_t
- certmonger_unconfined_t
- cinder_api_t
- cinder_backup_t
- cinder_scheduler_t
- cinder_volume_t
- cloud_init_t
- cluster_t
- clvmd_t
- condor_startd_t
- conman_unconfined_script_t
- crond_t
- depmod_t
- devicekit_disk_t
- devicekit_power_t
- devicekit_t
- dirsrvadmin_unconfined_script_t
firstboot_t
- fsadm_t
- fwupd_t
- httpd_unconfined_script_t
- inetd_child_t
- inetd_t
- initrc_t
- insmod_t
install_t
- kdumpctl_t
- keepalived_unconfined_script_t
kernel_t
livecd_t
- lvm_t
- mount_t
- nagios_eventhandler_plugin_t
- nagios_unconfined_plugin_t
openshift_initrc_t
- openvpn_unconfined_script_t
- openwsman_t
- pegasus_openlmi_logicalfile_t
- pegasus_openlmi_unconfined_t
- pki_tomcat_script_t
- prelink_t
preupgrade_t
puppetagent_t
realmd_consolehelper_t
- realmd_t
rolekit_t
rpm_script_t
rpm_t
- rtas_errd_t
- samba_unconfined_net_t
- samba_unconfined_script_t
- semanage_t
- setfiles_mac_t
- sge_job_t
- sge_shepherd_t
- sosreport_t
- system_cronjob_t
- systemd_coredump_t
- tomcat_t
- tuned_t
- udev_t
- unconfined_cronjob_t
unconfined_dbusd_t
- unconfined_mount_t
- unconfined_munin_plugin_t
- unconfined_sendmail_t
- unconfined_service_t
unconfined_t
- virt_qemu_ga_unconfined_t
- virtd_lxc_t
- virtd_t
- vmtools_helper_t
- vmtools_t
- vmtools_unconfined_t
- vmware_host_t
- watchdog_unconfined_t
- wine_t
- xdm_unconfined_t
- xserver_t
- zabbix_script_t

 お疲れさまです。