Patch for strict policy
Added policy templates for swat, ktalkd, in.comcast, and rsyn daemons to be run by xinetd. Separated out inetd_child_t context into a macro.
Mailman fixes
domains/program/initrc.te +5 -0
@@ -48,6 +48,8 @@ allow initrc_t usbdevfs_t:dir r_dir_perms; allow initrc_t usbdevfs_t:lnk_file r_file_perms; allow initrc_t usbdevfs_t:file getattr; +allow initrc_t usbfs_t:dir r_dir_perms; +allow initrc_t usbfs_t:file getattr; # allow initrc to fork and renice itself allow initrc_t self:process { fork sigchld setsched setpgid setrlimit };
@@ -199,6 +201,9 @@ allow initrc_t boot_t:lnk_file rw_file_perms; file_type_auto_trans(initrc_t, boot_t, boot_runtime_t, file) +allow initrc_t tmpfs_t:chr_file rw_file_perms; +allow initrc_t tmpfs_t:dir r_dir_perms; + # # readahead asks for these #
domains/program/mount.te +1 -1
@@ -97,6 +97,6 @@ can_exec(mount_t, { sbin_t bin_t }) allow mount_t device_t:dir r_dir_perms; ifdef(`distro_redhat', ` -dontaudit mount_t tmpfs_t:chr_file { read write }; +allow mount_t tmpfs_t:chr_file { read write }; allow mount_t tmpfs_t:dir { mounton }; ')
domains/program/unused/cardmgr.te +2 -2
@@ -23,7 +23,7 @@ allow cardmgr_t home_root_t:dir search; # Use capabilities (net_admin for route), setuid for cardctl -allow cardmgr_t self:capability { dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod }; +allow cardmgr_t self:capability { dac_read_search dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod }; # for /etc/resolv.conf file_type_auto_trans(cardmgr_t, etc_t, net_conf_t, file)
@@ -78,7 +78,7 @@ domain_auto_trans(apmd_t, { cardctl_exec_t cardmgr_exec_t }, cardmgr_t) ') -ifdef(`hide_broken_symptoms', `', ` +ifdef(`hide_broken_symptoms', ` dontaudit insmod_t cardmgr_dev_t:chr_file { read write }; dontaudit ifconfig_t cardmgr_dev_t:chr_file { read write }; ')
domains/program/unused/comsat.te +14 -0
@@ -0,0 +1,14 @@ +#DESC comsat - biff server +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the comsat_t domain. +# +# comsat_exec_t is the type of the comsat executable. +# + +type comsat_port_t, port_type; +inetd_child_domain(comsat)
domains/program/unused/cups.te +1 -0
@@ -168,3 +168,4 @@ allow cupsd_t hald_t:dbus { send_msg }; allow hald_t cupsd_t:dbus { send_msg }; ') +allow cupsd_t userdomain:dbus { send_msg };
domains/program/unused/dbskkd.te +14 -0
@@ -0,0 +1,14 @@ +#DESC dbskkd - A dictionary server for the SKK Japanese input method system. +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the dbskkd_t domain. +# +# dbskkd_exec_t is the type of the dbskkd executable. +# + +type dbskkd_port_t, port_type; +inetd_child_domain(dbskkd)
domains/program/unused/hald.te +3 -0
@@ -50,6 +50,9 @@ allow hald_t udev_tbl_t:file { getattr read }; ') +ifdef(`udev.te', ` +r_dir_file(hald_t, hotplug_etc_t) +') allow hald_t usbdevfs_t:dir search; allow hald_t usbdevfs_t:file { getattr read }; allow hald_t usbfs_t:dir search;
domains/program/unused/hotplug.te +3 -0
@@ -47,6 +47,9 @@ ifdef(`distro_redhat', ` # for arping used for static IP addresses on PCMCIA ethernet domain_auto_trans(hotplug_t, netutils_exec_t, netutils_t) + +allow hotplug_t tmpfs_t:dir search; +allow hotplug_t tmpfs_t:chr_file rw_file_perms; ')dnl end if distro_redhat ')dnl end if netutils.te
domains/program/unused/inetd.te +1 -49
62 lines not on this page · raw message
domains/program/unused/rpcd.te +9 -4
@@ -91,14 +91,19 @@ type nfsd_rw_t, file_type, sysadmfile, usercanread; type nfsd_ro_t, file_type, sysadmfile, usercanread; -ifdef(`nfs_export_all_rw', ` +bool nfs_export_all_rw false; + +if(nfs_export_all_rw) { allow nfsd_t { file_type -shadow_t }:dir r_dir_perms; create_dir_file(kernel_t,{ file_type -shadow_t }) -') -ifdef(`nfs_export_all_ro', ` +} + +bool nfs_export_all_ro false; + +if(nfs_export_all_ro) { allow nfsd_t { file_type -shadow_t }:dir r_dir_perms; r_dir_file(kernel_t,{ file_type -shadow_t }) -') +} allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir r_dir_perms; create_dir_file(kernel_t, nfsd_rw_t); r_dir_file(kernel_t, nfsd_ro_t);
domains/program/unused/rsync.te +14 -0
@@ -0,0 +1,14 @@ +#DESC rsync - flexible replacement for rcp +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the rsync_t domain. +# +# rsync_exec_t is the type of the rsync executable. +# + +type rsync_port_t, port_type; +inetd_child_domain(rsync)
domains/program/unused/swat.te +14 -0
@@ -0,0 +1,14 @@ +#DESC swat - Samba Web Administration Tool +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the swat_t domain. +# +# swat_exec_t is the type of the swat executable. +# + +type swat_port_t, port_type; +inetd_child_domain(swat)
domains/program/unused/udev.te +3 -1
@@ -23,7 +23,7 @@ # type udev_tbl_t, file_type, sysadmfile, dev_fs; file_type_auto_trans(udev_t, device_t, udev_tbl_t, file) -allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod }; +allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod net_raw net_admin }; allow udev_t self:file { getattr read }; allow udev_t self:unix_stream_socket {connectto create_stream_socket_perms}; allow udev_t self:unix_dgram_socket create_socket_perms;
@@ -103,3 +103,5 @@ dbusd_client(system, udev_t) allow udev_t device_t:dir { relabelfrom relabelto create_dir_perms }; +allow udev_t sysctl_modprobe_t:file { getattr read }; +allow udev_t udev_t:rawip_socket create_socket_perms;
file_contexts/program/comsat.fc +2 -0
@@ -0,0 +1,2 @@ +# biff server +/usr/sbin/in.comsat -- system_u:object_r:comsat_exec_t
file_contexts/program/dbskkd.fc +2 -0
@@ -0,0 +1,2 @@ +# A dictionary server for the SKK Japanese input method system. +/usr/sbin/dbskkd-cdb -- system_u:object_r:dbskkd_exec_t
file_contexts/program/ktalkd.fc +2 -0
@@ -0,0 +1,2 @@ +# kde talk daemon +/usr/bin/ktalkd -- system_u:object_r:ktalkd_exec_t
file_contexts/program/mailman.fc +4 -0
@@ -7,6 +7,7 @@ /usr/mailman/mail/wrapper -- system_u:object_r:mailman_mail_exec_t /var/lib/mailman(/.*)? system_u:object_r:mailman_data_t /var/lib/mailman/archives(/.*)? system_u:object_r:mailman_archive_t +/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /etc/cron\.daily/mailman -- system_u:object_r:mailman_queue_exec_t /etc/cron\.monthly/mailman -- system_u:object_r:mailman_queue_exec_t ')
@@ -19,5 +20,8 @@ /var/mailman/archives(/.*)? system_u:object_r:mailman_archive_t /var/mailman/scripts/mailman -- system_u:object_r:mailman_mail_exec_t /var/mailman/bin/qrunner -- system_u:object_r:mailman_queue_exec_t +/var/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /var/mailman/mail/mailman -- system_u:object_r:mailman_mail_exec_t +/var/mailman/Mailman(/.*?) system_u:object_r:lib_t +/var/mailman/pythonlib(/.*?) system_u:object_r:lib_t ')
file_contexts/program/rsync.fc +2 -0
@@ -0,0 +1,2 @@ +# rsync program +/usr/bin/rsync -- system_u:object_r:rsync_exec_t
file_contexts/program/swat.fc +2 -0
@@ -0,0 +1,2 @@ +# samba management tool +/usr/sbin/swat -- system_u:object_r:swat_exec_t
macros/base_user_macros.te +1 -0
@@ -291,6 +291,7 @@ # allow $1_t rpc_pipefs_t:dir { getattr }; allow $1_t nfsd_fs_t:dir { getattr }; +allow $1_t binfmt_misc_fs_t:dir { getattr }; # /initrd is left mounted, various programs try to look at it dontaudit $1_t ramfs_t:dir { getattr };
macros/program/inetd_macros.te +52 -0
52 lines not on this page · raw message
macros/program/mozilla_macros.te +2 -0
@@ -115,6 +115,8 @@ dontaudit $1_mozilla_t bin_t:dir { getattr }; dontaudit $1_mozilla_t port_type:tcp_socket { name_bind }; dontaudit $1_mozilla_t dri_device_t:chr_file rw_file_perms; +# Mozilla tries to delete .fonts.cache-1 +dontaudit $1_mozilla_t $1_home_t:file { unlink }; ifdef(`xdm.te', ` allow $1_mozilla_t xdm_t:fifo_file { write read };
net_contexts +1 -1
@@ -35,7 +35,6 @@ portcon udp 891 system_u:object_r:inetd_port_t portcon tcp 892 system_u:object_r:inetd_port_t portcon udp 892 system_u:object_r:inetd_port_t -portcon tcp 901 system_u:object_r:biff_port_t ') ifdef(`ftpd.te', ` portcon tcp 20 system_u:object_r:ftp_data_port_t
@@ -105,6 +104,7 @@ portcon udp 631 system_u:object_r:ipp_port_t ') ifdef(`spamd.te', `portcon tcp 783 system_u:object_r:spamd_port_t') +ifdef(`swat.te', `portcon tcp 901 system_u:object_r:swat_port_t') ifdef(`named.te', `portcon tcp 953 system_u:object_r:rndc_port_t') ifdef(`use_pop', ` portcon tcp 993 system_u:object_r:pop_port_t
tunables/distro.tun +1 -1
@@ -5,7 +5,7 @@ # appropriate ifdefs. -dnl define(`distro_redhat') +define(`distro_redhat') dnl define(`distro_suse')
tunables/tunable.tun +10 -16
@@ -1,48 +1,42 @@ # Allow all domains to connect to nscd -dnl define(`nscd_all_connect') +define(`nscd_all_connect') # Allow users to control network interfaces (also needs USERCTL=true) dnl define(`user_net_control') # Allow users to execute the mount command -dnl define(`user_can_mount') +define(`user_can_mount') # Allow rpm to run unconfined. -dnl define(`unlimitedRPM') +define(`unlimitedRPM') # Allow privileged utilities like hotplug and insmod to run unconfined. -dnl define(`unlimitedUtils') +define(`unlimitedUtils') # Support NFS home directories -dnl define(`nfs_home_dirs') +define(`nfs_home_dirs') # Allow users to run games -dnl define(`use_games') +define(`use_games') # Allow ypbind to run with NIS -dnl define(`allow_ypbind') +define(`allow_ypbind') # Allow rc scripts to run unconfined, including any daemon # started by an rc script that does not have a domain transition # explicitly defined. -dnl define(`unlimitedRC') +define(`unlimitedRC') # Allow sysadm_t to directly start daemons define(`direct_sysadm_daemon') # Do not audit things that we know to be broken but which # are not security risks -dnl define(`hide_broken_symptoms') - -# Allow the read/write/create on any NFS file system -dnl define(`nfs_export_all_rw') - -# Allow the reading on any NFS file system -dnl define(`nfs_export_all_ro') +define(`hide_broken_symptoms') # Allow user_r to reach sysadm_r via su, sudo, or userhelper. # Otherwise, only staff_r can do so. -dnl define(`user_canbe_sysadm') +define(`user_canbe_sysadm') # Allow xinetd to run unconfined, including any services it starts # that do not have a domain transition explicitly defined.
Quoted 4 lines · Daniel J Walsh
Added policy templates for swat, ktalkd, in.comcast, and rsyn daemons to be run by xinetd.
Separated outinetd_child_tcontext into a macro.
Mailman fixes
-allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod };
+allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod net_raw net_admin };
What is udev doing that requires net_raw and net_admin?
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Shouldn't there be a ktalkd.te? I don't think ktalkd_exec_t is defined anywhere.
Quoted 12 lines · Daniel J Walsh
Added policy templates for swat, ktalkd, in.comcast, and rsyn daemons to be run by xinetd.
Separated outinetd_child_tcontext into a macro.
Mailman fixes______________________________________________________________________
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/ktalkd.fc policy-1.17.20/file_contexts/program/ktalkd.fcfile_contexts/program/ktalkd.fc +2
-0@@ -0,0 +1,2 @@ +# kde talk daemon +/usr/bin/ktalkd -- system_u:object_r:ktalkd_exec_t
Signature · 7 lines
James Carter <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · James Carter
Shouldn't there be a ktalkd.te? I don't think
ktalkd_exec_tis defined anywhere.Quoted 4 lines · Daniel J Walsh
Added policy templates for swat, ktalkd, in.comcast, and rsyn daemons to be run by xinetd. Separated out
inetd_child_tcontext into a macro.
Mailman fixes
Quoted 12 lines
file_contexts/program/ktalkd.fc line 2
Quoted 9 lines
______________________________________________________________________
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/ktalkd.fc policy-1.17.20/file_contexts/program/ktalkd.fcfile_contexts/program/ktalkd.fc +2
-0@@ -0,0 +1,2 @@ +# kde talk daemon +/usr/bin/ktalkd -- system_u:object_r:ktalkd_exec_t
Oops, yes here is a new patch including ktalkd, some of russells fixes.
domains/misc/screensaver.te +18 -0
@@ -0,0 +1,18 @@ +# +# Alias file to stop blow up during policy upgrade, since +# screensaver policy is being removed. +# +typealias bin_t alias screensaver_exec_t; +typealias sysadm_home_t alias sysadm_screensaver_t; +typealias sysadm_home_t alias sysadm_screensaver_rw_t; +typealias sysadm_home_t alias sysadm_screensaver_ro_t; +typealias sysadm_home_t alias sysadm_screensaver_tmpfs_t; +typealias user_home_t alias user_screensaver_t; +typealias user_home_t alias user_screensaver_rw_t; +typealias user_home_t alias user_screensaver_ro_t; +typealias user_home_t alias user_screensaver_tmpfs_t; +typealias staff_home_t alias staff_screensaver_t; +typealias staff_home_t alias staff_screensaver_rw_t; +typealias staff_home_t alias staff_screensaver_ro_t; +typealias staff_home_t alias staff_screensaver_tmpfs_t; +
domains/program/initrc.te +5 -0
@@ -48,6 +48,8 @@ allow initrc_t usbdevfs_t:dir r_dir_perms; allow initrc_t usbdevfs_t:lnk_file r_file_perms; allow initrc_t usbdevfs_t:file getattr; +allow initrc_t usbfs_t:dir r_dir_perms; +allow initrc_t usbfs_t:file getattr; # allow initrc to fork and renice itself allow initrc_t self:process { fork sigchld setsched setpgid setrlimit };
@@ -199,6 +201,9 @@ allow initrc_t boot_t:lnk_file rw_file_perms; file_type_auto_trans(initrc_t, boot_t, boot_runtime_t, file) +allow initrc_t tmpfs_t:chr_file rw_file_perms; +allow initrc_t tmpfs_t:dir r_dir_perms; + # # readahead asks for these #
domains/program/mount.te +1 -1
@@ -97,6 +97,6 @@ can_exec(mount_t, { sbin_t bin_t }) allow mount_t device_t:dir r_dir_perms; ifdef(`distro_redhat', ` -dontaudit mount_t tmpfs_t:chr_file { read write }; +allow mount_t tmpfs_t:chr_file { read write }; allow mount_t tmpfs_t:dir { mounton }; ')
domains/program/unused/cardmgr.te +2 -2
@@ -23,7 +23,7 @@ allow cardmgr_t home_root_t:dir search; # Use capabilities (net_admin for route), setuid for cardctl -allow cardmgr_t self:capability { dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod }; +allow cardmgr_t self:capability { dac_read_search dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod }; # for /etc/resolv.conf file_type_auto_trans(cardmgr_t, etc_t, net_conf_t, file)
@@ -78,7 +78,7 @@ domain_auto_trans(apmd_t, { cardctl_exec_t cardmgr_exec_t }, cardmgr_t) ') -ifdef(`hide_broken_symptoms', `', ` +ifdef(`hide_broken_symptoms', ` dontaudit insmod_t cardmgr_dev_t:chr_file { read write }; dontaudit ifconfig_t cardmgr_dev_t:chr_file { read write }; ')
domains/program/unused/comsat.te +14 -0
@@ -0,0 +1,14 @@ +#DESC comsat - biff server +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the comsat_t domain. +# +# comsat_exec_t is the type of the comsat executable. +# + +type comsat_port_t, port_type; +inetd_child_domain(comsat)
domains/program/unused/consoletype.te +3 -0
@@ -54,3 +54,6 @@ ifdef(`distro_redhat', ` allow consoletype_t tmpfs_t:chr_file { getattr ioctl read write }; ') +allow consoletype_t firstboot_t:fifo_file { write }; +dontaudit consoletype_t proc_t:file { read }; +dontaudit consoletype_t root_t:file { read };
domains/program/unused/cups.te +5 -1
@@ -31,7 +31,6 @@ allow cupsd_t printer_device_t:chr_file rw_file_perms; allow cupsd_t urandom_device_t:chr_file { getattr read }; dontaudit cupsd_t random_device_t:chr_file ioctl; -dontaudit cupsd_t device_t:lnk_file { read }; # temporary solution, we need something better allow cupsd_t serial_device:chr_file rw_file_perms;
@@ -156,6 +155,7 @@ allow ptal_t printer_device_t:chr_file { ioctl read write }; allow ptal_t { etc_t etc_runtime_t }:file { getattr read }; r_dir_file(ptal_t, usbdevfs_t) +r_dir_file(ptal_t, usbfs_t) allow cupsd_t ptal_var_run_t:sock_file { write setattr }; allow cupsd_t ptal_t:unix_stream_socket { connectto }; allow cupsd_t ptal_var_run_t:dir { search };
@@ -167,4 +167,8 @@ ifdef(`hald.te', ` allow cupsd_t hald_t:dbus { send_msg }; allow hald_t cupsd_t:dbus { send_msg }; +allow hald_t cupsd_etc_t:dir search; +allow hald_t printconf_t:file { getattr read }; +domain_auto_trans(hald_t, cupsd_exec_t, cupsd_t) ') +allow cupsd_t userdomain:dbus { send_msg };
domains/program/unused/dbskkd.te +14 -0
@@ -0,0 +1,14 @@ +#DESC dbskkd - A dictionary server for the SKK Japanese input method system. +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the dbskkd_t domain. +# +# dbskkd_exec_t is the type of the dbskkd executable. +# + +type dbskkd_port_t, port_type; +inetd_child_domain(dbskkd)
domains/program/unused/hald.te +5 -1
@@ -38,6 +38,8 @@ allow hald_t device_t:lnk_file read; allow hald_t { fixed_disk_device_t removable_device_t }:blk_file { getattr read ioctl }; allow hald_t event_device_t:chr_file { getattr read ioctl }; +allow hald_t printer_device_t:chr_file rw_file_perms; +allow hald_t urandom_device_t:chr_file { read }; ifdef(`updfstab.te', ` domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)
@@ -50,6 +52,9 @@ allow hald_t udev_tbl_t:file { getattr read }; ') +ifdef(`udev.te', ` +r_dir_file(hald_t, hotplug_etc_t) +') allow hald_t usbdevfs_t:dir search; allow hald_t usbdevfs_t:file { getattr read }; allow hald_t usbfs_t:dir search;
@@ -57,4 +62,3 @@ allow hald_t bin_t:lnk_file read; dontaudit hald_t selinux_config_t:dir { search }; dontaudit hald_t userdomain:fd { use }; -
domains/program/unused/hotplug.te +3 -0
@@ -47,6 +47,9 @@ ifdef(`distro_redhat', ` # for arping used for static IP addresses on PCMCIA ethernet domain_auto_trans(hotplug_t, netutils_exec_t, netutils_t) + +allow hotplug_t tmpfs_t:dir search; +allow hotplug_t tmpfs_t:chr_file rw_file_perms; ')dnl end if distro_redhat ')dnl end if netutils.te
domains/program/unused/inetd.te +1 -49
62 lines not on this page · raw message
domains/program/unused/iptables.te +3 -0
@@ -56,3 +56,6 @@ # system-config-network appends to /var/log allow iptables_t var_log_t:file { append }; +ifdef(`firstboot.te', ` +allow iptables_t firstboot_t:fifo_file { write }; +')
domains/program/unused/ktalkd.te +14 -0
@@ -0,0 +1,14 @@ +#DESC ktalkd - KDE version of the talk server +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the ktalkd_t domain. +# +# ktalkd_exec_t is the type of the ktalkd executable. +# + +type ktalkd_port_t, port_type; +inetd_child_domain(ktalkd)
domains/program/unused/ntpd.te +3 -0
@@ -66,3 +66,6 @@ can_udp_send(ntpd_t, sysadm_t) can_udp_send(sysadm_t, ntpd_t) can_udp_send(ntpd_t, ntpd_t) +ifdef(`firstboot.te', ` +dontaudit ntpd_t firstboot_t:fd { use }; +')
domains/program/unused/rhgb.te +1 -1
@@ -34,7 +34,7 @@ allow insmod_t rhgb_t:fd use; allow rhgb_t ramfs_t:filesystem { mount unmount }; -allow rhgb_t mnt_t:dir { mounton }; +allow rhgb_t mnt_t:dir { search mounton }; allow rhgb_t rhgb_t:capability { sys_admin }; dontaudit rhgb_t var_run_t:dir { search };
domains/program/unused/rpcd.te +9 -4
@@ -91,14 +91,19 @@ type nfsd_rw_t, file_type, sysadmfile, usercanread; type nfsd_ro_t, file_type, sysadmfile, usercanread; -ifdef(`nfs_export_all_rw', ` +bool nfs_export_all_rw false; + +if(nfs_export_all_rw) { allow nfsd_t { file_type -shadow_t }:dir r_dir_perms; create_dir_file(kernel_t,{ file_type -shadow_t }) -') -ifdef(`nfs_export_all_ro', ` +} + +bool nfs_export_all_ro false; + +if(nfs_export_all_ro) { allow nfsd_t { file_type -shadow_t }:dir r_dir_perms; r_dir_file(kernel_t,{ file_type -shadow_t }) -') +} allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir r_dir_perms; create_dir_file(kernel_t, nfsd_rw_t); r_dir_file(kernel_t, nfsd_ro_t);
domains/program/unused/rsync.te +14 -0
@@ -0,0 +1,14 @@ +#DESC rsync - flexible replacement for rcp +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the rsync_t domain. +# +# rsync_exec_t is the type of the rsync executable. +# + +type rsync_port_t, port_type; +inetd_child_domain(rsync)
domains/program/unused/screensaver.te +0 -15
@@ -1,15 +0,0 @@ -#DESC screensaver - X Windows screensaver needs access to password -# -# Authors: Dan Walsh <[email protected]> -# - -################################# -# -# Rules for the screensaver_t domain -# - -type screensaver_exec_t, file_type, sysadmfile, exec_type; - -# Everything else is in the screensaver_domain macro in -# macros/program/screensaver_macros.te. -
domains/program/unused/swat.te +14 -0
@@ -0,0 +1,14 @@ +#DESC swat - Samba Web Administration Tool +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the swat_t domain. +# +# swat_exec_t is the type of the swat executable. +# + +type swat_port_t, port_type; +inetd_child_domain(swat)
domains/program/unused/udev.te +3 -1
@@ -23,7 +23,7 @@ # type udev_tbl_t, file_type, sysadmfile, dev_fs; file_type_auto_trans(udev_t, device_t, udev_tbl_t, file) -allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod }; +allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod net_raw net_admin }; allow udev_t self:file { getattr read }; allow udev_t self:unix_stream_socket {connectto create_stream_socket_perms}; allow udev_t self:unix_dgram_socket create_socket_perms;
@@ -103,3 +103,5 @@ dbusd_client(system, udev_t) allow udev_t device_t:dir { relabelfrom relabelto create_dir_perms }; +allow udev_t sysctl_modprobe_t:file { getattr read }; +allow udev_t udev_t:rawip_socket create_socket_perms;
file_contexts/program/comsat.fc +2 -0
@@ -0,0 +1,2 @@ +# biff server +/usr/sbin/in.comsat -- system_u:object_r:comsat_exec_t
file_contexts/program/dbskkd.fc +2 -0
@@ -0,0 +1,2 @@ +# A dictionary server for the SKK Japanese input method system. +/usr/sbin/dbskkd-cdb -- system_u:object_r:dbskkd_exec_t
file_contexts/program/ktalkd.fc +2 -0
@@ -0,0 +1,2 @@ +# kde talk daemon +/usr/bin/ktalkd -- system_u:object_r:ktalkd_exec_t
file_contexts/program/mailman.fc +4 -0
@@ -7,6 +7,7 @@ /usr/mailman/mail/wrapper -- system_u:object_r:mailman_mail_exec_t /var/lib/mailman(/.*)? system_u:object_r:mailman_data_t /var/lib/mailman/archives(/.*)? system_u:object_r:mailman_archive_t +/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /etc/cron\.daily/mailman -- system_u:object_r:mailman_queue_exec_t /etc/cron\.monthly/mailman -- system_u:object_r:mailman_queue_exec_t ')
@@ -19,5 +20,8 @@ /var/mailman/archives(/.*)? system_u:object_r:mailman_archive_t /var/mailman/scripts/mailman -- system_u:object_r:mailman_mail_exec_t /var/mailman/bin/qrunner -- system_u:object_r:mailman_queue_exec_t +/var/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /var/mailman/mail/mailman -- system_u:object_r:mailman_mail_exec_t +/var/mailman/Mailman(/.*?) system_u:object_r:lib_t +/var/mailman/pythonlib(/.*?) system_u:object_r:lib_t ')
file_contexts/program/rsync.fc +2 -0
@@ -0,0 +1,2 @@ +# rsync program +/usr/bin/rsync -- system_u:object_r:rsync_exec_t
file_contexts/program/screensaver.fc +0 -7
@@ -1,7 +0,0 @@ -# screensaver -/usr/X11R6/bin/xscreensaver -- system_u:object_r:screensaver_exec_t -/usr/X11R6/bin/xscreensaver-demo -- system_u:object_r:screensaver_exec_t -/opt/kde3/bin/kdesktop_lock -- system_u:object_r:screensaver_exec_t -/usr/bin/kdesktop_lock -- system_u:object_r:screensaver_exec_t -/usr/X11R6/lib(64)?/xscreensaver(.*)? system_u:object_r:bin_t -HOME_DIR/\.xscreensaver system_u:object_r:ROLE_screensaver_rw_t
file_contexts/program/swat.fc +2 -0
@@ -0,0 +1,2 @@ +# samba management tool +/usr/sbin/swat -- system_u:object_r:swat_exec_t
file_contexts/types.fc +3 -0
@@ -144,6 +144,9 @@ /dev/par.* -c system_u:object_r:printer_device_t /dev/usb/lp.* -c system_u:object_r:printer_device_t /dev/usblp.* -c system_u:object_r:printer_device_t +ifdef(`distro_redhat', ` +/dev/root -b system_u:object_r:fixed_disk_device_t +') /u?dev/[shmx]d[^/]* -b system_u:object_r:fixed_disk_device_t /u?dev/dm-[0-9]+ -b system_u:object_r:fixed_disk_device_t /u?dev/sg[0-9]+ -c system_u:object_r:scsi_generic_device_t
macros/base_user_macros.te +0 -1
@@ -153,7 +153,6 @@ ifdef(`screen.te', `screen_domain($1)') ifdef(`mozilla.te', `mozilla_domain($1)') -ifdef(`screensaver.te', `screensaver_domain($1)') ifdef(`use_games', `ifdef(`games.te', `games_domain($1)')') ifdef(`gpg.te', `gpg_domain($1)') ifdef(`xauth.te', `xauth_domain($1)')
macros/program/inetd_macros.te +52 -0
52 lines not on this page · raw message
macros/program/mozilla_macros.te +2 -0
@@ -115,6 +115,8 @@ dontaudit $1_mozilla_t bin_t:dir { getattr }; dontaudit $1_mozilla_t port_type:tcp_socket { name_bind }; dontaudit $1_mozilla_t dri_device_t:chr_file rw_file_perms; +# Mozilla tries to delete .fonts.cache-1 +dontaudit $1_mozilla_t $1_home_t:file { unlink }; ifdef(`xdm.te', ` allow $1_mozilla_t xdm_t:fifo_file { write read };
macros/program/screensaver_macros.te +0 -83
83 lines not on this page · raw message
net_contexts +1 -1
@@ -35,7 +35,6 @@ portcon udp 891 system_u:object_r:inetd_port_t portcon tcp 892 system_u:object_r:inetd_port_t portcon udp 892 system_u:object_r:inetd_port_t -portcon tcp 901 system_u:object_r:biff_port_t ') ifdef(`ftpd.te', ` portcon tcp 20 system_u:object_r:ftp_data_port_t
@@ -105,6 +104,7 @@ portcon udp 631 system_u:object_r:ipp_port_t ') ifdef(`spamd.te', `portcon tcp 783 system_u:object_r:spamd_port_t') +ifdef(`swat.te', `portcon tcp 901 system_u:object_r:swat_port_t') ifdef(`named.te', `portcon tcp 953 system_u:object_r:rndc_port_t') ifdef(`use_pop', ` portcon tcp 993 system_u:object_r:pop_port_t
tunables/distro.tun +1 -1
@@ -5,7 +5,7 @@ # appropriate ifdefs. -dnl define(`distro_redhat') +define(`distro_redhat') dnl define(`distro_suse')
tunables/tunable.tun +10 -16
@@ -1,48 +1,42 @@ # Allow all domains to connect to nscd -dnl define(`nscd_all_connect') +define(`nscd_all_connect') # Allow users to control network interfaces (also needs USERCTL=true) dnl define(`user_net_control') # Allow users to execute the mount command -dnl define(`user_can_mount') +define(`user_can_mount') # Allow rpm to run unconfined. -dnl define(`unlimitedRPM') +define(`unlimitedRPM') # Allow privileged utilities like hotplug and insmod to run unconfined. -dnl define(`unlimitedUtils') +define(`unlimitedUtils') # Support NFS home directories -dnl define(`nfs_home_dirs') +define(`nfs_home_dirs') # Allow users to run games -dnl define(`use_games') +define(`use_games') # Allow ypbind to run with NIS -dnl define(`allow_ypbind') +define(`allow_ypbind') # Allow rc scripts to run unconfined, including any daemon # started by an rc script that does not have a domain transition # explicitly defined. -dnl define(`unlimitedRC') +define(`unlimitedRC') # Allow sysadm_t to directly start daemons define(`direct_sysadm_daemon') # Do not audit things that we know to be broken but which # are not security risks -dnl define(`hide_broken_symptoms') - -# Allow the read/write/create on any NFS file system -dnl define(`nfs_export_all_rw') - -# Allow the reading on any NFS file system -dnl define(`nfs_export_all_ro') +define(`hide_broken_symptoms') # Allow user_r to reach sysadm_r via su, sudo, or userhelper. # Otherwise, only staff_r can do so. -dnl define(`user_canbe_sysadm') +define(`user_canbe_sysadm') # Allow xinetd to run unconfined, including any services it starts # that do not have a domain transition explicitly defined.
Merged -- I think.
There were an awful lot of cvs adds and removes, I believe I got them all, but... :)
Quoted 28 lines · Daniel J Walsh
Quoted 11 lines · James Carter
Shouldn't there be a ktalkd.te? I don't think
ktalkd_exec_tis defined anywhere.Quoted 5 lines · Daniel J Walsh
Added policy templates for swat, ktalkd, in.comcast, and rsyn daemons to be run by xinetd.
Separated outinetd_child_tcontext into a macro.
Mailman fixesQuoted 12 lines
file_contexts/program/ktalkd.fc line 2
Quoted 9 lines
______________________________________________________________________
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/ktalkd.fc policy-1.17.20/file_contexts/program/ktalkd.fcfile_contexts/program/ktalkd.fc +2
-0@@ -0,0 +1,2 @@ +# kde talk daemon +/usr/bin/ktalkd -- system_u:object_r:ktalkd_exec_tOops, yes here is a new patch including ktalkd, some of russells fixes.
______________________________________________________________________
Signature · 7 lines
James Carter <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
domains/misc/screensaver.te line 3
Quoted 7 lines · Daniel J Walsh
diff --exclude-from=exclude -N -u -r nsapolicy/domains/misc/screensaver.te policy-1.17.22/domains/misc/screensaver.te
domains/misc/screensaver.te +3
-0@@ -0,0 +1,18 @@ +# +# Alias file to stop blow up during policy upgrade, since +# screensaver policy is being removed.
How will screensavers be able to authenticate users (think screen lock) if this policy is removed? screensavers had the auth_chkpwd attribute to do this; I do not think that we should grant this capability to user_t.
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
Quoted 14 lines · Thomas Bleher
domains/misc/screensaver.te line 3
Quoted 9 lines · Daniel J Walsh
diff --exclude-from=exclude -N -u -r nsapolicy/domains/misc/screensaver.te policy-1.17.22/domains/misc/screensaver.te --- nsapolicy/domains/misc/screensaver.te 1969-12-31 19:00:00.000000000 -0500 +++ policy-1.17.22/domains/misc/screensaver.te 2004-09-27 10:19:13.000000000 -0400 @@ -0,0 +1,18 @@
domains/misc/screensaver.te +3
-0+# +# Alias file to stop blow up during policy upgrade, since +# screensaver policy is being removed.How will screensavers be able to authenticate users (think screen lock) if this policy is removed? screensavers had the
auth_chkpwdattribute to do this; I do not think that we should grant this capability touser_t.
In macros/base_user_macros.te:
ifdef(chkpwd.te', chkpwd_domain($1)')
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.