patch: file-contexts fixes
This patch adds some file_contexts entries, mostly for suse. It also changes some entries from "(/.*)? --" to "/.* --", a bit cosmetic, but if we only match on regular files we can add the slash unconditionally.
Please apply.
Thomas
Signature · 2 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA D09E C562 2BAE B2F4 ABE7
file_contexts/program/apache.fc +2 -1
@@ -36,7 +36,8 @@ /var/run/gcache_port -s system_u:object_r:httpd_var_run_t ifdef(`distro_suse', ` # suse puts shell scripts there :-( -/usr/share/apache2/[^/]* -- system_u:object_r:bin_t +/usr/share/apache2/[^/]* -- system_u:object_r:bin_t +/usr/sbin/httpd2-.* -- system_u:object_r:httpd_exec_t ') /var/lib/squirrelmail/prefs(/.*)? system_u:object_r:httpd_squirrelmail_t /var/spool/squirrelmail(/.*)? system_u:object_r:squirrelmail_spool_t
file_contexts/program/apmd.fc +3 -0
@@ -1,9 +1,12 @@ # apmd /usr/sbin/apmd -- system_u:object_r:apmd_exec_t /usr/sbin/acpid -- system_u:object_r:apmd_exec_t +/usr/sbin/powersaved -- system_u:object_r:apmd_exec_t /usr/bin/apm -- system_u:object_r:apm_exec_t /var/run/apmd\.pid -- system_u:object_r:apmd_var_run_t /var/run/\.?acpid\.socket -s system_u:object_r:apmd_var_run_t +/var/run/powersaved\.pid -- system_u:object_r:apmd_var_run_t +/var/run/powersave_socket -s system_u:object_r:apmd_var_run_t /var/log/acpid -- system_u:object_r:apmd_log_t ifdef(`distro_suse', ` /var/lib/acpi(/.*)? system_u:object_r:apmd_var_lib_t
file_contexts/program/crond.fc +6 -0
@@ -27,3 +27,9 @@ /var/spool/at/spool -d system_u:object_r:cron_spool_t /var/spool/at/[^/]* -- <<none>> /var/run/atd\.pid -- system_u:object_r:crond_var_run_t +ifdef(`distro_suse', ` +/usr/lib/cron/run-crons -- system_u:object_r:bin_t +/var/spool/cron/lastrun -d system_u:object_r:crond_tmp_t +/var/spool/cron/lastrun/[^/]* -- <<none>> +/var/spool/cron/tabs -d system_u:object_r:cron_spool_t +')
file_contexts/program/dhcpc.fc +1 -0
@@ -6,6 +6,7 @@ /sbin/dhcpcd -- system_u:object_r:dhcpc_exec_t /sbin/dhclient.* -- system_u:object_r:dhcpc_exec_t /var/lib/dhcp(3)?/dhclient.* system_u:object_r:dhcpc_state_t +/var/lib/dhcpcd(/.*)? system_u:object_r:dhcpc_state_t /var/run/dhclient.*\.pid -- system_u:object_r:dhcpc_var_run_t /var/run/dhclient.*\.leases -- system_u:object_r:dhcpc_var_run_t # pump
file_contexts/program/dpkg.fc +0 -1
@@ -32,7 +32,6 @@ /var/cache/debconf(/.*)? system_u:object_r:debconf_cache_t /etc/dpkg/.+ -- system_u:object_r:dpkg_etc_t /etc/menu-methods/.* -- system_u:object_r:install_menu_exec_t -/etc/kde2/.+\.sh -- system_u:object_r:install_menu_exec_t /usr/share/console/getkmapchoice\.pl -- system_u:object_r:bin_t /var/run/update-menus\.pid -- system_u:object_r:install_menu_var_run_t /usr/share/dlint/digparse -- system_u:object_r:bin_t
file_contexts/program/fetchmail.fc +1 -1
@@ -1,5 +1,5 @@ # fetchmail /etc/fetchmailrc -- system_u:object_r:fetchmail_etc_t /usr/bin/fetchmail -- system_u:object_r:fetchmail_exec_t -/var/run/fetchmail(/.*)? -- system_u:object_r:fetchmail_var_run_t +/var/run/fetchmail/.* -- system_u:object_r:fetchmail_var_run_t /var/mail/\.fetchmail-UIDL-cache -- system_u:object_r:fetchmail_uidl_cache_t
file_contexts/program/fsadm.fc +1 -0
@@ -22,6 +22,7 @@ /sbin/swapon.* -- system_u:object_r:fsadm_exec_t /sbin/hdparm -- system_u:object_r:fsadm_exec_t /sbin/raidstart -- system_u:object_r:fsadm_exec_t +/sbin/raidautorun -- system_u:object_r:fsadm_exec_t /sbin/mkraid -- system_u:object_r:fsadm_exec_t /sbin/blockdev -- system_u:object_r:fsadm_exec_t /sbin/losetup.* -- system_u:object_r:fsadm_exec_t
file_contexts/program/initrc.fc +3 -0
@@ -19,6 +19,9 @@ /var/run/sysconfig(/.*)? system_u:object_r:initrc_var_run_t /var/run/keymap -- system_u:object_r:initrc_var_run_t /var/run/numlock-on -- system_u:object_r:initrc_var_run_t +/var/run/setleds-on -- system_u:object_r:initrc_var_run_t +/var/run/bootsplashctl -p system_u:object_r:initrc_var_run_t +/etc/init\.d/\.depend.* -- system_u:object_r:etc_runtime_t ') ifdef(`distro_gentoo', `
file_contexts/program/lvm.fc +2 -2
@@ -14,8 +14,8 @@ /dev/lvm -c system_u:object_r:fixed_disk_device_t /dev/mapper/.* -b system_u:object_r:fixed_disk_device_t /dev/mapper/control -c system_u:object_r:lvm_control_t -/lib/lvm-10(/.*) -- system_u:object_r:lvm_exec_t -/lib/lvm-200(/.*) -- system_u:object_r:lvm_exec_t +/lib/lvm-10/.* -- system_u:object_r:lvm_exec_t +/lib/lvm-200/.* -- system_u:object_r:lvm_exec_t /sbin/e2fsadm -- system_u:object_r:lvm_exec_t /sbin/lvchange -- system_u:object_r:lvm_exec_t /sbin/lvcreate -- system_u:object_r:lvm_exec_t
file_contexts/program/nrpe.fc +2 -2
@@ -2,6 +2,6 @@ /usr/bin/nrpe -- system_u:object_r:nrpe_exec_t /etc/nagios/nrpe\.cfg -- system_u:object_r:nrpe_etc_t ifdef(`nagios.te', `', ` -/usr/lib(64)?/netsaint/plugins(/.*)? -- system_u:object_r:bin_t -/usr/lib(64)?/nagios/plugins(/.*)? -- system_u:object_r:bin_t +/usr/lib(64)?/netsaint/plugins(/.*)? system_u:object_r:bin_t +/usr/lib(64)?/nagios/plugins(/.*)? system_u:object_r:bin_t ')
file_contexts/program/openvpn.fc +1 -1
@@ -1,4 +1,4 @@ # OpenVPN -/etc/openvpn(/.*)? -- system_u:object_r:openvpn_etc_t +/etc/openvpn/.* -- system_u:object_r:openvpn_etc_t /usr/sbin/openvpn -- system_u:object_r:openvpn_exec_t
file_contexts/program/pppd.fc +1 -1
@@ -11,7 +11,7 @@ /etc/ppp/.*secrets -- system_u:object_r:pppd_secret_t /var/run/(i)?ppp.*pid -- system_u:object_r:pppd_var_run_t /var/log/ppp-connect-errors.* -- system_u:object_r:pppd_log_t -/var/log/ppp(/.*)? -- system_u:object_r:pppd_log_t +/var/log/ppp/.* -- system_u:object_r:pppd_log_t /etc/ppp/ip-down.* -- system_u:object_r:bin_t /etc/ppp/ip-up.* -- system_u:object_r:bin_t /etc/ppp/ipv6-up -- system_u:object_r:bin_t
file_contexts/program/screen.fc +2 -2
@@ -1,5 +1,5 @@ # screen /usr/bin/screen -- system_u:object_r:screen_exec_t HOME_DIR/\.screenrc -- system_u:object_r:ROLE_screen_ro_home_t -/var/run/screen/S-[^/]+ -d system_u:object_r:screen_dir_t -/var/run/screen/S-[^/]+/.* <<none>> +/var/run/screens?/S-[^/]+ -d system_u:object_r:screen_dir_t +/var/run/screens?/S-[^/]+/.* <<none>>
file_contexts/types.fc +1 -1
@@ -110,7 +110,7 @@ # /boot # /boot(/.*)? system_u:object_r:boot_t -/boot/System\.map-.* -- system_u:object_r:system_map_t +/boot/System\.map(-.*)? system_u:object_r:system_map_t # # /dev