patch for firefox
Subsystems (2)
the attached patch is required for firefox 0.9.3 to run under debian (and other oses?)
the reason for the patch is because someone decided to write a script around firefox called firefox-bin that does some LD_LIBRARY_PATH messing to keep /usr/lib/mozilla/blah separate.
that this [script] messes up kde from being able to re-run firefox-bin for session management because the real binary is fired up without the correct LD_LIBRARY_PATH doesn't seem to have occurred to anyone, but that's another story...
l.
Signature · 7 lines
-- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br />
file_contexts/program/mozilla.fc +1 -0
@@ -10,6 +10,7 @@ /usr/bin/mozilla-snapshot -- system_u:object_r:mozilla_exec_t /usr/bin/epiphany-bin -- system_u:object_r:mozilla_exec_t /usr/lib(64)?/firefox/firefox-bin -- system_u:object_r:mozilla_exec_t +/usr/lib(64)?/mozilla-firefox/firefox-bin -- system_u:object_r:mozilla_exec_t /usr/bin/mozilla-[0-9].* -- system_u:object_r:mozilla_exec_t /usr/bin/mozilla-bin-[0-9].* -- system_u:object_r:mozilla_exec_t /usr/lib(64)?/netscape/.+/communicator/communicator-smotif.real -- system_u:object_r:mozilla_exec_t
Quoted 11 lines · Luke Kenneth Casson Leighton
the attached patch is required for firefox 0.9.3 to run under debian (and other oses?)
the reason for the patch is because someone decided to write a script around firefox called firefox-bin that does some
LD_LIBRARY_PATHmessing to keep/usr/lib/mozilla/blahseparate.that this [script] messes up kde from being able to re-run firefox-bin for session management because the real binary is fired up without the correct
LD_LIBRARY_PATHdoesn't seem to have occurred to anyone, but that's another story...
Try the attached mozilla.fc. It's got the latest stuff from the CVS plus a change equivalent to the one you made.
Signature · 4 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
# netscape/mozilla
HOME_DIR/\.netscape(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.mozilla(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.phoenix(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.gconfd(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.gconf(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.gnome2/epiphany(/.*)? system_u:object_r:ROLE_mozilla_rw_t/usr/bin/netscape -- system_u:object_r:mozilla_exec_t/usr/bin/mozilla -- system_u:object_r:mozilla_exec_t/usr/bin/mozilla-snapshot -- system_u:object_r:mozilla_exec_t/usr/bin/epiphany-bin -- system_u:object_r:mozilla_exec_t
/usr/bin/mozilla-[0-9].* -- system_u:object_r:mozilla_exec_t
/usr/bin/mozilla-bin-[0-9].* -- system_u:object_r:mozilla_exec_t
/usr/lib(64)?/netscape/.+/communicator/communicator-smotif.real -- system_u:object_r:mozilla_exec_t /usr/lib(64)?/netscape/base-4/wrapper -- system_u:object_r:mozilla_exec_t
/usr/lib(64)?/mozilla[^/]*/reg.+ -- system_u:object_r:mozilla_exec_t
/usr/lib(64)?/mozilla[^/]*/mozilla-.* -- system_u:object_r:mozilla_exec_t
/usr/lib(64)?/firefox[^/]*/mozilla-.* -- system_u:object_r:mozilla_exec_t
/usr/lib(64)?/[^/]*firefox[^/]*/firefox-bin -- system_u:object_r:mozilla_exec_t
Merged changes.
Quoted 15 lines · Russell Coker
Quoted 11 lines · Luke Kenneth Casson Leighton
the attached patch is required for firefox 0.9.3 to run under debian (and other oses?)
the reason for the patch is because someone decided to write a script around firefox called firefox-bin that does some
LD_LIBRARY_PATHmessing to keep/usr/lib/mozilla/blahseparate.that this [script] messes up kde from being able to re-run firefox-bin for session management because the real binary is fired up without the correct
LD_LIBRARY_PATHdoesn't seem to have occurred to anyone, but that's another story...Try the attached mozilla.fc. It's got the latest stuff from the CVS plus a change equivalent to the one you made.
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.
Latest diffs from our pool
Some of Russells changes are included.
Dan
domains/program/crond.te +2 -0
@@ -81,11 +81,13 @@ ifdef(`distro_redhat', ` # Run the rpm program in the rpm_t domain. Allow creation of RPM log files # via redirection of standard out. +ifdef(`rpm.te', ` allow crond_t rpm_log_t: file create_file_perms; system_crond_entry(rpm_exec_t, rpm_t) allow system_crond_t rpm_log_t:file create_file_perms; ') +') allow system_crond_t var_log_t:file r_file_perms;
domains/program/initrc.te +4 -2
@@ -12,12 +12,14 @@ # initrc_exec_t is the type of the init program. # # do not use privmail for sendmail as it creates a type transition conflict -type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') sysctl_kernel_writer; ifdef(`sendmail.te', ` +# do not use privmail for sendmail as it creates a type transition conflict +type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, sysctl_kernel_writer; allow system_mail_t initrc_t:fd use; allow system_mail_t initrc_t:fifo_file write; +', ` +type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem,auth_write, unrestricted, ') domain, privlog, privowner, privmodule, sysctl_kernel_writer, privmail; ') - role system_r types initrc_t; uses_shlib(initrc_t); can_ypbind(initrc_t)
domains/program/ssh.te +1 -0
@@ -232,6 +232,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t) # Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.
domains/program/syslogd.te +3 -0
@@ -95,3 +95,6 @@ # dontaudit syslogd_t file_t:dir search; allow syslogd_t devpts_t:dir { search }; +# For tageted policy tries to read /init +dontaudit syslogd_t root_t:file { getattr read }; +
domains/program/unused/apache.te +1 -0
@@ -41,6 +41,7 @@ append_logdir_domain(httpd) #can read /etc/httpd/logs allow httpd_t httpd_log_t:lnk_file { read }; +allow httpd_t httpd_log_t:dir { remove_name }; # For /etc/init.d/apache2 reload can_tcp_connect(httpd_t, httpd_t)
domains/program/unused/canna.te +0 -1
@@ -40,4 +40,3 @@ can_unix_connect(i18n_input_t, canna_t) ') -allow canna_t tmp_t:dir search;
domains/program/unused/cups.te +1 -0
@@ -157,5 +157,6 @@ allow cupsd_t ptal_var_run_t:dir { search }; dontaudit ptal_t { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search }; +allow cupsd_t printer_device_t:fifo_file rw_file_perms; dontaudit cupsd_t selinux_config_t:dir search; dontaudit cupsd_t selinux_config_t:file { getattr read };
domains/program/unused/dbusd.te +1 -0
@@ -32,3 +32,4 @@ # SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbus_exec_t, dbus_t)
domains/program/unused/dovecot.te +6 -1
@@ -11,7 +11,7 @@ type dovecot_cert_t, file_type, sysadmfile; -allow dovecot_t self:capability { dac_override dac_read_search chown net_bind_service setgid setuid sys_chroot }; +allow dovecot_t self:capability { chown net_bind_service setgid setuid sys_chroot dac_override dac_read_search }; allow dovecot_t self:process { setrlimit }; can_network(dovecot_t) can_ypbind(dovecot_t)
@@ -19,8 +19,13 @@ allow dovecot_t self:unix_stream_socket create_stream_socket_perms; can_unix_connect(dovecot_t, self) +# For SSL certificates +allow dovecot_t usr_t:file { getattr read }; + allow dovecot_t etc_t:file { getattr read }; allow dovecot_t initrc_var_run_t:file { getattr }; +# Dovecot sub-binaries are lib_t on Debian and bin_t on Fedora +allow dovecot_t lib_t:file { execute execute_no_trans }; allow dovecot_t bin_t:dir { getattr search }; can_exec(dovecot_t, bin_t)
domains/program/unused/ftpd.te +1 -0
@@ -101,3 +101,4 @@ allow ftpd_t nfs_t:file r_file_perms; } ')dnl end if nfs_home_dirs +dontaudit ftpd_t selinux_config_t:dir { search };
domains/program/unused/hald.te +4 -1
@@ -33,7 +33,10 @@ 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 }; -ifdef(`updfstab.te', `domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)') +ifdef(`updfstab.te', ` +domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t) +allow updfstab_t hald_t:dbus { send_msg }; +') ifdef(`udev.te', ` domain_auto_trans(hald_t, udev_exec_t, udev_t) allow udev_t hald_t:unix_dgram_socket sendto;
domains/program/unused/hotplug.te +0 -1
@@ -137,7 +137,6 @@ ifdef(`udev.te', ` domain_auto_trans(hotplug_t, { udev_exec_t udev_helper_exec_t }, udev_t) -allow hotplug_t udev_helper_exec_t:lnk_file read; ') file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
domains/program/unused/iptables.te +2 -4
@@ -23,10 +23,9 @@ # to allow rules to be saved on reboot allow iptables_t initrc_tmp_t:file rw_file_perms; -type iptables_var_run_t, file_type, sysadmfile, pidfile; - domain_auto_trans(iptables_t, ifconfig_exec_t, ifconfig_t) -file_type_auto_trans(iptables_t, var_run_t, iptables_var_run_t, file) +allow iptables_t var_t:dir search; +var_run_domain(iptables) allow iptables_t self:process { fork signal_perms };
@@ -57,4 +56,3 @@ # system-config-network appends to /var/log allow iptables_t var_log_t:file { append }; -allow iptables_t var_t:dir { search };
domains/program/unused/mdadm.te +0 -1
@@ -28,7 +28,6 @@ # Ignore attempts to read every device file dontaudit mdadm_t device_type:{ chr_file blk_file } getattr; dontaudit mdadm_t device_t:{ fifo_file file dir chr_file blk_file } { read getattr }; -dontaudit mdadm_t device_t:dir r_dir_perms; dontaudit mdadm_t devpts_t:dir r_dir_perms; # Ignore attempts to read/write sysadmin tty
domains/program/unused/openca-ca.te +10 -10
@@ -39,11 +39,6 @@ allow httpd_t openca_ca_t:process {transition}; allow httpd_t openca_ca_exec_t:dir r_dir_perms; -############################################################# -# Allow the script access to the library files so it can run -############################################################# -can_exec(openca_ca_t, lib_t) - ################################################################## # Allow the script to get the file descriptor from the http deamon # and send sigchild to http deamon
@@ -52,6 +47,16 @@ allow openca_ca_t httpd_t:fd use; allow openca_ca_t httpd_t:fifo_file {getattr write}; +############################################ +# Allow scripts to append to http logs +######################################### +allow openca_ca_t httpd_log_t:file { append getattr }; + +############################################################# +# Allow the script access to the library files so it can run +############################################################# +can_exec(openca_ca_t, lib_t) + ######################################################################## # The script needs to inherit the file descriptor and find the script it # needs to run
@@ -79,11 +84,6 @@ ############################################################################## allow openca_ca_t openca_ca_exec_t:dir search; -############################################ -# Allow scripts to append to http logs -######################################### -allow openca_ca_t httpd_log_t:file { append getattr }; - # # Allow access to writeable files under /etc/openca #
domains/program/unused/portmap.te +1 -0
@@ -26,6 +26,7 @@ # portmap binds to arbitary ports allow portmap_t port_t:{ udp_socket tcp_socket } name_bind; +allow portmap_t reserved_port_t:{ udp_socket tcp_socket } name_bind; allow portmap_t etc_t:file { getattr read };
domains/program/unused/rpm.te +2 -3
@@ -10,7 +10,7 @@ # var_log_rpm_t is the type for rpm log files (/var/log/rpmpkgs*) # var_lib_rpm_t is the type for rpm files in /var/lib # -type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `, unrestricted, auth_write'); role system_r types rpm_t; uses_shlib(rpm_t) type rpm_exec_t, file_type, sysadmfile, exec_type;
@@ -60,7 +60,6 @@ allow rpm_t devtty_t:chr_file rw_file_perms; domain_auto_trans(rpm_t, ldconfig_exec_t, ldconfig_t) -domain_auto_trans(rpm_t, initrc_exec_t, initrc_t) ifdef(`cups.te', ` r_dir_file(cupsd_t, rpm_var_lib_t)
@@ -116,7 +115,7 @@ allow { insmod_t depmod_t } rpm_t:fifo_file rw_file_perms; -type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `, unrestricted, auth_write'); # policy for rpm scriptlet role system_r types rpm_script_t; uses_shlib(rpm_script_t)
domains/program/unused/udev.te +16 -12
@@ -16,7 +16,6 @@ etc_domain(udev) typealias udev_etc_t alias etc_udev_t; type udev_helper_exec_t, file_type, sysadmfile, exec_type; -r_dir_file(udev_t, udev_helper_exec_t) can_exec(udev_t, udev_helper_exec_t) #
@@ -32,19 +31,20 @@ allow udev_t device_t:blk_file create_file_perms; allow udev_t device_t:chr_file create_file_perms; allow udev_t device_t:sock_file create_file_perms; -allow udev_t etc_t:file { getattr read execute }; +allow udev_t device_t:lnk_file create_lnk_perms; +allow udev_t etc_t:file { getattr read }; allow udev_t { bin_t sbin_t }:dir r_dir_perms; allow udev_t { sbin_t bin_t }:lnk_file read; -can_exec(udev_t, { shell_exec_t bin_t sbin_t } ) +allow udev_t bin_t:lnk_file read; +can_exec(udev_t, { shell_exec_t bin_t sbin_t etc_t } ) can_exec(udev_t, udev_exec_t) -can_exec(udev_t, hostname_exec_t) -can_exec(udev_t, iptables_exec_t) r_dir_file(udev_t, sysfs_t) allow udev_t sysadm_tty_device_t:chr_file { read write }; allow udev_t { device_t device_type }:{chr_file blk_file} { relabelfrom relabelto create_file_perms }; -# to read the file_contexts file? -r_dir_file(udev_t, policy_config_t) +# to read the file_contexts file +allow udev_t { selinux_config_t default_context_t }:dir search; +allow udev_t default_context_t:file { getattr read }; allow udev_t policy_config_t:dir { search }; allow udev_t proc_t:file { read };
@@ -52,6 +52,9 @@ # Get security policy decisions. can_getsecurity(udev_t) +# set file system create context +can_setfscreate(udev_t) + allow udev_t kernel_t:fd { use }; allow udev_t kernel_t:unix_dgram_socket { sendto ioctl read write };
@@ -61,7 +64,9 @@ domain_auto_trans(initrc_t, udev_exec_t, udev_t) domain_auto_trans(kernel_t, udev_exec_t, udev_t) domain_auto_trans(udev_t, restorecon_exec_t, restorecon_t) -allow restorecon_t udev_t:unix_dgram_socket { read write }; +ifdef(`hide_broken_symptoms', ` +dontaudit restorecon_t udev_t:unix_dgram_socket { read write }; +') allow udev_t devpts_t:dir { search }; allow udev_t etc_runtime_t:file { getattr read }; allow udev_t etc_t:file { ioctl };
@@ -79,12 +84,11 @@ can_exec(udev_t, consoletype_exec_t) ') domain_auto_trans(udev_t, ifconfig_exec_t, ifconfig_t) -allow ifconfig_t udev_t:unix_dgram_socket { read write }; +ifdef(`hide_broken_symptoms', ` +dontaudit ifconfig_t udev_t:unix_dgram_socket { read write }; +') dontaudit udev_t file_t:dir search; -allow udev_t device_t:lnk_file create_file_perms; -allow udev_t var_lock_t:dir { search }; -allow udev_t var_lock_t:file { getattr read }; ifdef(`dhcpc.te', ` domain_auto_trans(udev_t, dhcpc_exec_t, dhcpc_t) ')
domains/program/unused/xdm.te +1 -1
@@ -28,7 +28,7 @@ # for xdmctl allow xdm_t xdm_var_run_t:fifo_file create_file_perms; allow initrc_t xdm_var_run_t:fifo_file unlink; -file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, fifo_file) +file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, { fifo_file dir }) tmp_domain(xdm) var_lib_domain(xdm)
domains/program/unused/xfs.te +0 -1
@@ -40,4 +40,3 @@ # Read /usr/X11R6/lib/X11/fonts/.* and /usr/share/fonts/.* allow xfs_t fonts_t:dir search; allow xfs_t fonts_t:file { getattr read }; -allow xfs_t tmpfs_t:dir { search };
file_contexts/program/dovecot.fc +6 -0
@@ -1,6 +1,12 @@ # for Dovecot POP and IMAP server /usr/sbin/dovecot -- system_u:object_r:dovecot_exec_t +ifdef(`distro_redhat', ` /usr/libexec/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t +') +ifdef(`distro_debian', ` +/usr/lib/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t +/usr/lib/dovecot/.+ -- system_u:object_r:bin_t +') /usr/share/ssl/certs/dovecot.pem -- system_u:object_r:dovecot_cert_t /usr/share/ssl/private/dovecot.pem -- system_u:object_r:dovecot_cert_t /var/run/dovecot(-login)?(/.*)? system_u:object_r:dovecot_var_run_t
file_contexts/program/initrc.fc +2 -0
@@ -13,7 +13,9 @@ /var/run/setmixer_flag -- system_u:object_r:initrc_var_run_t # run_init /usr/sbin/run_init -- system_u:object_r:run_init_exec_t +ifdef(`distro_debian', ` /usr/sbin/open_init_pty -- system_u:object_r:initrc_exec_t +') /etc/nologin.* -- system_u:object_r:etc_runtime_t /etc/nohotplug -- system_u:object_r:etc_runtime_t /halt -- system_u:object_r:etc_runtime_t
file_contexts/program/mailman.fc +0 -3
@@ -4,7 +4,6 @@ /usr/lib/cgi-bin/mailman/.* -- system_u:object_r:mailman_cgi_exec_t /usr/lib/mailman/cron/.* -- system_u:object_r:mailman_queue_exec_t /usr/lib/mailman/mail/wrapper -- system_u:object_r:mailman_mail_exec_t -/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /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
@@ -14,8 +13,6 @@ ifdef(`distro_redhat', ` /var/mailman/cgi-bin/.* -- system_u:object_r:mailman_cgi_exec_t /var/mailman/data(/.*)? system_u:object_r:mailman_data_t -/var/mailman/pythonlib(/.*)? system_u:object_r:mailman_data_t -/var/mailman/Mailman(/.*)? system_u:object_r:mailman_data_t /var/mailman/locks(/.*)? system_u:object_r:mailman_lock_t /var/mailman/cron -d system_u:object_r:bin_t /var/mailman/cron/.+ -- system_u:object_r:mailman_queue_exec_t
file_contexts/program/udev.fc +3 -2
@@ -3,7 +3,8 @@ /sbin/udev -- system_u:object_r:udev_exec_t /sbin/udevd -- system_u:object_r:udev_exec_t /usr/bin/udevinfo -- system_u:object_r:udev_exec_t -/etc/dev\.d(/.*)? system_u:object_r:udev_helper_exec_t -/etc/hotplug.d/default/udev.* system_u:object_r:udev_helper_exec_t +/etc/dev\.d/.+ -- system_u:object_r:udev_helper_exec_t +/etc/udev/scripts/.+ -- system_u:object_r:udev_helper_exec_t +/etc/hotplug.d/default/udev.* -- system_u:object_r:udev_helper_exec_t /dev/udev\.tbl -- system_u:object_r:udev_tbl_t /dev/\.udev\.tdb -- system_u:object_r:udev_tbl_t
file_contexts/program/xfs.fc +1 -0
@@ -1,3 +1,4 @@ # xfs /tmp/\.font-unix(/.*)? system_u:object_r:xfs_tmp_t /usr/X11R6/bin/xfs -- system_u:object_r:xfs_exec_t +/usr/X11R6/bin/xfs-xtt -- system_u:object_r:xfs_exec_t
file_contexts/types.fc +1 -1
@@ -217,7 +217,7 @@ /u?dev/amixer.* -c system_u:object_r:sound_device_t /u?dev/snd/.* -c system_u:object_r:sound_device_t /u?dev/n?[hs]t[0-9].* -c system_u:object_r:tape_device_t -/u?dev/n?(raw)?[qr]ft[0-3] -c system_u:object_r:tape_device_t +/u?dev/(n?raw)?[qr]ft[0-3] -c system_u:object_r:tape_device_t /u?dev/n?z?qft[0-3] -c system_u:object_r:tape_device_t /u?dev/n?tpqic[12].* -c system_u:object_r:tape_device_t /u?dev/ht[0-1] -b system_u:object_r:tape_device_t
macros/core_macros.te +1 -1
@@ -590,7 +590,7 @@ # define(`can_create_pty',` base_pty_perms($1) -pty_slave_label($1, `$2') +pty_slave_label($1, $2) ')
macros/global_macros.te +1 -2
@@ -598,7 +598,6 @@ # Set user information and skip authentication. allow $1 self:passwd *; - allow $1 self:dbus *; allow $1 self:nscd *; -') +')dnl end unconfined_domain
macros/program/screen_macros.te +2 -3
@@ -48,9 +48,8 @@ ifdef(`gnome-pty-helper.te', `allow $1_screen_t $1_gph_t:fd use;') allow $1_screen_t $1_home_screen_t:{ file lnk_file } r_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } create_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } { relabelfrom relabelto }; - +allow $1_t $1_home_screen_t:file { create_file_perms relabelfrom relabelto }; +allow $1_t $1_home_screen_t:lnk_file { create_lnk_perms relabelfrom relabelto }; ifdef(`nfs_home_dirs', ` r_dir_file($1_screen_t, nfs_t) ')dnl end if nfs_home_dirs
macros/program/xserver_macros.te +1 -0
@@ -241,6 +241,7 @@ allow $1_xserver_t var_lib_t:dir search; rw_dir_create_file($1_xserver_t, var_lib_xkb_t) +dontaudit $1_xserver_t selinux_config_t:dir { search }; # for fonts r_dir_file($1_xserver_t, fonts_t)
Makefile +1 -0
@@ -146,6 +146,7 @@ @grep -v "^/root" [email protected] > [email protected] @/usr/sbin/genhomedircon . [email protected] > $@ @grep "^/root" [email protected] >> $@ + @for i in /proc/ide/hd*/media; do grep -q cdrom $$i && echo $$i | awk -F / '{ print "/dev/"$$4"\t-b\tsystem_u:object_r:removable_device_t"}' >> $@ || true; done @-rm [email protected] [email protected] clean:
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 +12 -10
@@ -5,40 +5,40 @@ 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') +define(`hide_broken_symptoms') # Allow sysadm_t to do almost everything dnl define(`unrestricted_admin') # Allow the read/write/create on any NFS file system -dnl define(`nfs_export_all_rw') +define(`nfs_export_all_rw') # Allow users to unrestricted access dnl define(`unlimitedUsers')
@@ -48,9 +48,11 @@ # 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. dnl define(`unlimitedInetd') +# Allow spamassasin to do DNS lookups +dnl define(`spamassasin_can_network')
Previous patch broken.
In reply to James Carterdomains/program/crond.te +2 -0
@@ -81,11 +81,13 @@ ifdef(`distro_redhat', ` # Run the rpm program in the rpm_t domain. Allow creation of RPM log files # via redirection of standard out. +ifdef(`rpm.te', ` allow crond_t rpm_log_t: file create_file_perms; system_crond_entry(rpm_exec_t, rpm_t) allow system_crond_t rpm_log_t:file create_file_perms; ') +') allow system_crond_t var_log_t:file r_file_perms;
domains/program/initrc.te +4 -2
@@ -12,12 +12,14 @@ # initrc_exec_t is the type of the init program. # # do not use privmail for sendmail as it creates a type transition conflict -type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') sysctl_kernel_writer; ifdef(`sendmail.te', ` +# do not use privmail for sendmail as it creates a type transition conflict +type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, sysctl_kernel_writer; allow system_mail_t initrc_t:fd use; allow system_mail_t initrc_t:fifo_file write; +', ` +type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem,auth_write, unrestricted, ') domain, privlog, privowner, privmodule, sysctl_kernel_writer, privmail; ') - role system_r types initrc_t; uses_shlib(initrc_t); can_ypbind(initrc_t)
domains/program/ssh.te +1 -0
@@ -232,6 +232,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t) # Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.
domains/program/syslogd.te +3 -0
@@ -95,3 +95,6 @@ # dontaudit syslogd_t file_t:dir search; allow syslogd_t devpts_t:dir { search }; +# For tageted policy tries to read /init +dontaudit syslogd_t root_t:file { getattr read }; +
domains/program/unused/apache.te +1 -0
@@ -41,6 +41,7 @@ append_logdir_domain(httpd) #can read /etc/httpd/logs allow httpd_t httpd_log_t:lnk_file { read }; +allow httpd_t httpd_log_t:dir { remove_name }; # For /etc/init.d/apache2 reload can_tcp_connect(httpd_t, httpd_t)
domains/program/unused/canna.te +0 -1
@@ -40,4 +40,3 @@ can_unix_connect(i18n_input_t, canna_t) ') -allow canna_t tmp_t:dir search;
domains/program/unused/cups.te +1 -0
@@ -157,5 +157,6 @@ allow cupsd_t ptal_var_run_t:dir { search }; dontaudit ptal_t { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search }; +allow cupsd_t printer_device_t:fifo_file rw_file_perms; dontaudit cupsd_t selinux_config_t:dir search; dontaudit cupsd_t selinux_config_t:file { getattr read };
domains/program/unused/dbusd.te +1 -0
@@ -32,3 +32,4 @@ # SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbusd_exec_t, dbusd_t)
domains/program/unused/dovecot.te +6 -1
@@ -11,7 +11,7 @@ type dovecot_cert_t, file_type, sysadmfile; -allow dovecot_t self:capability { dac_override dac_read_search chown net_bind_service setgid setuid sys_chroot }; +allow dovecot_t self:capability { chown net_bind_service setgid setuid sys_chroot dac_override dac_read_search }; allow dovecot_t self:process { setrlimit }; can_network(dovecot_t) can_ypbind(dovecot_t)
@@ -19,8 +19,13 @@ allow dovecot_t self:unix_stream_socket create_stream_socket_perms; can_unix_connect(dovecot_t, self) +# For SSL certificates +allow dovecot_t usr_t:file { getattr read }; + allow dovecot_t etc_t:file { getattr read }; allow dovecot_t initrc_var_run_t:file { getattr }; +# Dovecot sub-binaries are lib_t on Debian and bin_t on Fedora +allow dovecot_t lib_t:file { execute execute_no_trans }; allow dovecot_t bin_t:dir { getattr search }; can_exec(dovecot_t, bin_t)
domains/program/unused/ftpd.te +1 -0
@@ -101,3 +101,4 @@ allow ftpd_t nfs_t:file r_file_perms; } ')dnl end if nfs_home_dirs +dontaudit ftpd_t selinux_config_t:dir { search };
domains/program/unused/hald.te +4 -1
@@ -33,7 +33,10 @@ 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 }; -ifdef(`updfstab.te', `domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)') +ifdef(`updfstab.te', ` +domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t) +allow updfstab_t hald_t:dbus { send_msg }; +') ifdef(`udev.te', ` domain_auto_trans(hald_t, udev_exec_t, udev_t) allow udev_t hald_t:unix_dgram_socket sendto;
domains/program/unused/hotplug.te +0 -1
@@ -137,7 +137,6 @@ ifdef(`udev.te', ` domain_auto_trans(hotplug_t, { udev_exec_t udev_helper_exec_t }, udev_t) -allow hotplug_t udev_helper_exec_t:lnk_file read; ') file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
domains/program/unused/iptables.te +2 -4
@@ -23,10 +23,9 @@ # to allow rules to be saved on reboot allow iptables_t initrc_tmp_t:file rw_file_perms; -type iptables_var_run_t, file_type, sysadmfile, pidfile; - domain_auto_trans(iptables_t, ifconfig_exec_t, ifconfig_t) -file_type_auto_trans(iptables_t, var_run_t, iptables_var_run_t, file) +allow iptables_t var_t:dir search; +var_run_domain(iptables) allow iptables_t self:process { fork signal_perms };
@@ -57,4 +56,3 @@ # system-config-network appends to /var/log allow iptables_t var_log_t:file { append }; -allow iptables_t var_t:dir { search };
domains/program/unused/mdadm.te +0 -1
@@ -28,7 +28,6 @@ # Ignore attempts to read every device file dontaudit mdadm_t device_type:{ chr_file blk_file } getattr; dontaudit mdadm_t device_t:{ fifo_file file dir chr_file blk_file } { read getattr }; -dontaudit mdadm_t device_t:dir r_dir_perms; dontaudit mdadm_t devpts_t:dir r_dir_perms; # Ignore attempts to read/write sysadmin tty
domains/program/unused/openca-ca.te +10 -10
@@ -39,11 +39,6 @@ allow httpd_t openca_ca_t:process {transition}; allow httpd_t openca_ca_exec_t:dir r_dir_perms; -############################################################# -# Allow the script access to the library files so it can run -############################################################# -can_exec(openca_ca_t, lib_t) - ################################################################## # Allow the script to get the file descriptor from the http deamon # and send sigchild to http deamon
@@ -52,6 +47,16 @@ allow openca_ca_t httpd_t:fd use; allow openca_ca_t httpd_t:fifo_file {getattr write}; +############################################ +# Allow scripts to append to http logs +######################################### +allow openca_ca_t httpd_log_t:file { append getattr }; + +############################################################# +# Allow the script access to the library files so it can run +############################################################# +can_exec(openca_ca_t, lib_t) + ######################################################################## # The script needs to inherit the file descriptor and find the script it # needs to run
@@ -79,11 +84,6 @@ ############################################################################## allow openca_ca_t openca_ca_exec_t:dir search; -############################################ -# Allow scripts to append to http logs -######################################### -allow openca_ca_t httpd_log_t:file { append getattr }; - # # Allow access to writeable files under /etc/openca #
domains/program/unused/portmap.te +1 -0
@@ -26,6 +26,7 @@ # portmap binds to arbitary ports allow portmap_t port_t:{ udp_socket tcp_socket } name_bind; +allow portmap_t reserved_port_t:{ udp_socket tcp_socket } name_bind; allow portmap_t etc_t:file { getattr read };
domains/program/unused/rpm.te +2 -3
@@ -10,7 +10,7 @@ # var_log_rpm_t is the type for rpm log files (/var/log/rpmpkgs*) # var_lib_rpm_t is the type for rpm files in /var/lib # -type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `, unrestricted, auth_write'); role system_r types rpm_t; uses_shlib(rpm_t) type rpm_exec_t, file_type, sysadmfile, exec_type;
@@ -60,7 +60,6 @@ allow rpm_t devtty_t:chr_file rw_file_perms; domain_auto_trans(rpm_t, ldconfig_exec_t, ldconfig_t) -domain_auto_trans(rpm_t, initrc_exec_t, initrc_t) ifdef(`cups.te', ` r_dir_file(cupsd_t, rpm_var_lib_t)
@@ -116,7 +115,7 @@ allow { insmod_t depmod_t } rpm_t:fifo_file rw_file_perms; -type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `, unrestricted, auth_write'); # policy for rpm scriptlet role system_r types rpm_script_t; uses_shlib(rpm_script_t)
domains/program/unused/udev.te +16 -12
@@ -16,7 +16,6 @@ etc_domain(udev) typealias udev_etc_t alias etc_udev_t; type udev_helper_exec_t, file_type, sysadmfile, exec_type; -r_dir_file(udev_t, udev_helper_exec_t) can_exec(udev_t, udev_helper_exec_t) #
@@ -32,19 +31,20 @@ allow udev_t device_t:blk_file create_file_perms; allow udev_t device_t:chr_file create_file_perms; allow udev_t device_t:sock_file create_file_perms; -allow udev_t etc_t:file { getattr read execute }; +allow udev_t device_t:lnk_file create_lnk_perms; +allow udev_t etc_t:file { getattr read }; allow udev_t { bin_t sbin_t }:dir r_dir_perms; allow udev_t { sbin_t bin_t }:lnk_file read; -can_exec(udev_t, { shell_exec_t bin_t sbin_t } ) +allow udev_t bin_t:lnk_file read; +can_exec(udev_t, { shell_exec_t bin_t sbin_t etc_t } ) can_exec(udev_t, udev_exec_t) -can_exec(udev_t, hostname_exec_t) -can_exec(udev_t, iptables_exec_t) r_dir_file(udev_t, sysfs_t) allow udev_t sysadm_tty_device_t:chr_file { read write }; allow udev_t { device_t device_type }:{chr_file blk_file} { relabelfrom relabelto create_file_perms }; -# to read the file_contexts file? -r_dir_file(udev_t, policy_config_t) +# to read the file_contexts file +allow udev_t { selinux_config_t default_context_t }:dir search; +allow udev_t default_context_t:file { getattr read }; allow udev_t policy_config_t:dir { search }; allow udev_t proc_t:file { read };
@@ -52,6 +52,9 @@ # Get security policy decisions. can_getsecurity(udev_t) +# set file system create context +can_setfscreate(udev_t) + allow udev_t kernel_t:fd { use }; allow udev_t kernel_t:unix_dgram_socket { sendto ioctl read write };
@@ -61,7 +64,9 @@ domain_auto_trans(initrc_t, udev_exec_t, udev_t) domain_auto_trans(kernel_t, udev_exec_t, udev_t) domain_auto_trans(udev_t, restorecon_exec_t, restorecon_t) -allow restorecon_t udev_t:unix_dgram_socket { read write }; +ifdef(`hide_broken_symptoms', ` +dontaudit restorecon_t udev_t:unix_dgram_socket { read write }; +') allow udev_t devpts_t:dir { search }; allow udev_t etc_runtime_t:file { getattr read }; allow udev_t etc_t:file { ioctl };
@@ -79,12 +84,11 @@ can_exec(udev_t, consoletype_exec_t) ') domain_auto_trans(udev_t, ifconfig_exec_t, ifconfig_t) -allow ifconfig_t udev_t:unix_dgram_socket { read write }; +ifdef(`hide_broken_symptoms', ` +dontaudit ifconfig_t udev_t:unix_dgram_socket { read write }; +') dontaudit udev_t file_t:dir search; -allow udev_t device_t:lnk_file create_file_perms; -allow udev_t var_lock_t:dir { search }; -allow udev_t var_lock_t:file { getattr read }; ifdef(`dhcpc.te', ` domain_auto_trans(udev_t, dhcpc_exec_t, dhcpc_t) ')
domains/program/unused/xdm.te +1 -1
@@ -28,7 +28,7 @@ # for xdmctl allow xdm_t xdm_var_run_t:fifo_file create_file_perms; allow initrc_t xdm_var_run_t:fifo_file unlink; -file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, fifo_file) +file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, { fifo_file dir }) tmp_domain(xdm) var_lib_domain(xdm)
domains/program/unused/xfs.te +0 -1
@@ -40,4 +40,3 @@ # Read /usr/X11R6/lib/X11/fonts/.* and /usr/share/fonts/.* allow xfs_t fonts_t:dir search; allow xfs_t fonts_t:file { getattr read }; -allow xfs_t tmpfs_t:dir { search };
file_contexts/program/dovecot.fc +6 -0
@@ -1,6 +1,12 @@ # for Dovecot POP and IMAP server /usr/sbin/dovecot -- system_u:object_r:dovecot_exec_t +ifdef(`distro_redhat', ` /usr/libexec/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t +') +ifdef(`distro_debian', ` +/usr/lib/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t +/usr/lib/dovecot/.+ -- system_u:object_r:bin_t +') /usr/share/ssl/certs/dovecot.pem -- system_u:object_r:dovecot_cert_t /usr/share/ssl/private/dovecot.pem -- system_u:object_r:dovecot_cert_t /var/run/dovecot(-login)?(/.*)? system_u:object_r:dovecot_var_run_t
file_contexts/program/initrc.fc +2 -0
@@ -13,7 +13,9 @@ /var/run/setmixer_flag -- system_u:object_r:initrc_var_run_t # run_init /usr/sbin/run_init -- system_u:object_r:run_init_exec_t +ifdef(`distro_debian', ` /usr/sbin/open_init_pty -- system_u:object_r:initrc_exec_t +') /etc/nologin.* -- system_u:object_r:etc_runtime_t /etc/nohotplug -- system_u:object_r:etc_runtime_t /halt -- system_u:object_r:etc_runtime_t
file_contexts/program/mailman.fc +0 -3
@@ -4,7 +4,6 @@ /usr/lib/cgi-bin/mailman/.* -- system_u:object_r:mailman_cgi_exec_t /usr/lib/mailman/cron/.* -- system_u:object_r:mailman_queue_exec_t /usr/lib/mailman/mail/wrapper -- system_u:object_r:mailman_mail_exec_t -/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /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
@@ -14,8 +13,6 @@ ifdef(`distro_redhat', ` /var/mailman/cgi-bin/.* -- system_u:object_r:mailman_cgi_exec_t /var/mailman/data(/.*)? system_u:object_r:mailman_data_t -/var/mailman/pythonlib(/.*)? system_u:object_r:mailman_data_t -/var/mailman/Mailman(/.*)? system_u:object_r:mailman_data_t /var/mailman/locks(/.*)? system_u:object_r:mailman_lock_t /var/mailman/cron -d system_u:object_r:bin_t /var/mailman/cron/.+ -- system_u:object_r:mailman_queue_exec_t
file_contexts/program/udev.fc +3 -2
@@ -3,7 +3,8 @@ /sbin/udev -- system_u:object_r:udev_exec_t /sbin/udevd -- system_u:object_r:udev_exec_t /usr/bin/udevinfo -- system_u:object_r:udev_exec_t -/etc/dev\.d(/.*)? system_u:object_r:udev_helper_exec_t -/etc/hotplug.d/default/udev.* system_u:object_r:udev_helper_exec_t +/etc/dev\.d/.+ -- system_u:object_r:udev_helper_exec_t +/etc/udev/scripts/.+ -- system_u:object_r:udev_helper_exec_t +/etc/hotplug.d/default/udev.* -- system_u:object_r:udev_helper_exec_t /dev/udev\.tbl -- system_u:object_r:udev_tbl_t /dev/\.udev\.tdb -- system_u:object_r:udev_tbl_t
file_contexts/program/xfs.fc +1 -0
@@ -1,3 +1,4 @@ # xfs /tmp/\.font-unix(/.*)? system_u:object_r:xfs_tmp_t /usr/X11R6/bin/xfs -- system_u:object_r:xfs_exec_t +/usr/X11R6/bin/xfs-xtt -- system_u:object_r:xfs_exec_t
file_contexts/types.fc +1 -1
@@ -217,7 +217,7 @@ /u?dev/amixer.* -c system_u:object_r:sound_device_t /u?dev/snd/.* -c system_u:object_r:sound_device_t /u?dev/n?[hs]t[0-9].* -c system_u:object_r:tape_device_t -/u?dev/n?(raw)?[qr]ft[0-3] -c system_u:object_r:tape_device_t +/u?dev/(n?raw)?[qr]ft[0-3] -c system_u:object_r:tape_device_t /u?dev/n?z?qft[0-3] -c system_u:object_r:tape_device_t /u?dev/n?tpqic[12].* -c system_u:object_r:tape_device_t /u?dev/ht[0-1] -b system_u:object_r:tape_device_t
macros/core_macros.te +1 -1
@@ -590,7 +590,7 @@ # define(`can_create_pty',` base_pty_perms($1) -pty_slave_label($1, `$2') +pty_slave_label($1, $2) ')
macros/global_macros.te +1 -2
@@ -598,7 +598,6 @@ # Set user information and skip authentication. allow $1 self:passwd *; - allow $1 self:dbus *; allow $1 self:nscd *; -') +')dnl end unconfined_domain
macros/program/screen_macros.te +2 -3
@@ -48,9 +48,8 @@ ifdef(`gnome-pty-helper.te', `allow $1_screen_t $1_gph_t:fd use;') allow $1_screen_t $1_home_screen_t:{ file lnk_file } r_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } create_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } { relabelfrom relabelto }; - +allow $1_t $1_home_screen_t:file { create_file_perms relabelfrom relabelto }; +allow $1_t $1_home_screen_t:lnk_file { create_lnk_perms relabelfrom relabelto }; ifdef(`nfs_home_dirs', ` r_dir_file($1_screen_t, nfs_t) ')dnl end if nfs_home_dirs
macros/program/xserver_macros.te +1 -0
@@ -241,6 +241,7 @@ allow $1_xserver_t var_lib_t:dir search; rw_dir_create_file($1_xserver_t, var_lib_xkb_t) +dontaudit $1_xserver_t selinux_config_t:dir { search }; # for fonts r_dir_file($1_xserver_t, fonts_t)
Makefile +1 -0
@@ -146,6 +146,7 @@ @grep -v "^/root" [email protected] > [email protected] @/usr/sbin/genhomedircon . [email protected] > $@ @grep "^/root" [email protected] >> $@ + @for i in /proc/ide/hd*/media; do grep -q cdrom $$i && echo $$i | awk -F / '{ print "/dev/"$$4"\t-b\tsystem_u:object_r:removable_device_t"}' >> $@ || true; done @-rm [email protected] [email protected] clean:
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 +12 -10
@@ -5,40 +5,40 @@ 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') +define(`hide_broken_symptoms') # Allow sysadm_t to do almost everything dnl define(`unrestricted_admin') # Allow the read/write/create on any NFS file system -dnl define(`nfs_export_all_rw') +define(`nfs_export_all_rw') # Allow users to unrestricted access dnl define(`unlimitedUsers')
@@ -48,9 +48,11 @@ # 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. dnl define(`unlimitedInetd') +# Allow spamassasin to do DNS lookups +dnl define(`spamassasin_can_network')
Re: Previous patch broken.
Mostly Merged. I removed the stuff reverting recent patches from Russell that I just merged.
Below is some comments, and attached is the diff that I merged.
domains/program/ssh.te line 238
Quoted 11 lines · Daniel J Walsh
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ssh.te policy-1.17.7/domains/program/ssh.te
domains/program/ssh.te +1
-0@@ -232,6 +232,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t) # Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.
Also added r_dir_file(sshd_t, self) further up in ssh.te to allow sshd to access /proc/pid/fd. (Why does it want to?)
domains/program/syslogd.te line 100
Quoted 10 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/syslogd.te policy-1.17.7/domains/program/syslogd.te
domains/program/syslogd.te +3
-0@@ -95,3 +95,6 @@ # dontaudit syslogd_t file_t:dir search; allow syslogd_t devpts_t:dir { search }; +# For tageted policy tries to read /init +dontaudit syslogd_t root_t:file { getattr read }; +
Instead I did:
global_macros.te +1 -1
@@ -295,7 +295,7 @@ ')dnl end if automount.te ifdef(`targeted_policy', ` dontaudit $1_t devpts_t:chr_file { read write }; -dontaudit $1_t unlabeled_t:file read; +dontaudit $1_t root_t:file { getattr read }; ')dnl end if targeted_policy ')dnl end macro daemon_core_rules
domains/program/unused/apache.te line 47
Quoted 11 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/apache.te policy-1.17.7/domains/program/unused/apache.te
domains/program/unused/apache.te +1
-0@@ -41,6 +41,7 @@ append_logdir_domain(httpd) #can read /etc/httpd/logs allow httpd_t httpd_log_t:lnk_file { read }; +allow httpd_t httpd_log_t:dir { remove_name }; # For /etc/init.d/apache2 reload can_tcp_connect(httpd_t, httpd_t)
Do we really want to do this?
domains/program/unused/dbusd.te line 35
Quoted 8 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dbusd.te policy-1.17.7/domains/program/unused/dbusd.te
domains/program/unused/dbusd.te +1
-0@@ -32,3 +32,4 @@ # SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbusd_exec_t, dbusd_t)
Steve posted on the list earlier today about this not being desired for the longterm.
Signature · 2 lines
James Carter <[email protected]> National Security Agency
Index: domains/program/crond.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/crond.te,v retrieving revision 1.33
program/crond.te +2 -0
@@ -81,11 +81,13 @@ ifdef(`distro_redhat', ` # Run the rpm program in the rpm_t domain. Allow creation of RPM log files # via redirection of standard out. +ifdef(`rpm.te', ` allow crond_t rpm_log_t: file create_file_perms; system_crond_entry(rpm_exec_t, rpm_t) allow system_crond_t rpm_log_t:file create_file_perms; ') +') allow system_crond_t var_log_t:file r_file_perms;
Index: domains/program/ssh.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/ssh.te,v retrieving revision 1.36
program/ssh.te +2 -0
@@ -147,6 +147,7 @@ # sshd_extern_t is the domain for ssh from outside our network # sshd_program_domain(sshd) +r_dir_file(sshd_t, self) if (ssh_sysadm_login) { sshd_spawn_domain(sshd, userdomain, { sysadm_devpts_t userpty_type }) } else {
@@ -232,6 +233,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t) # Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.
Index: domains/program/unused/canna.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/canna.te,v retrieving revision 1.7
program/unused/canna.te +0 -1
@@ -40,4 +40,3 @@ can_unix_connect(i18n_input_t, canna_t) ') -allow canna_t tmp_t:dir search;
Index: domains/program/unused/dbusd.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/dbusd.te,v retrieving revision 1.9
program/unused/dbusd.te +1 -0
@@ -32,3 +32,4 @@ # SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbusd_exec_t, dbusd_t)
Index: domains/program/unused/dovecot.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/dovecot.te,v retrieving revision 1.4
program/unused/dovecot.te +5 -0
@@ -19,8 +19,13 @@ allow dovecot_t self:unix_stream_socket create_stream_socket_perms; can_unix_connect(dovecot_t, self) +# For SSL certificates +allow dovecot_t usr_t:file { getattr read }; + allow dovecot_t etc_t:file { getattr read }; allow dovecot_t initrc_var_run_t:file { getattr }; +# Dovecot sub-binaries are lib_t on Debian and bin_t on Fedora +allow dovecot_t lib_t:file { execute execute_no_trans }; allow dovecot_t bin_t:dir { getattr search }; can_exec(dovecot_t, bin_t)
Index: domains/program/unused/ftpd.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/ftpd.te,v retrieving revision 1.22
program/unused/ftpd.te +1 -0
@@ -101,3 +101,4 @@ allow ftpd_t nfs_t:file r_file_perms; } ')dnl end if nfs_home_dirs +dontaudit ftpd_t selinux_config_t:dir { search };
Index: domains/program/unused/hald.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/hald.te,v retrieving revision 1.4
program/unused/hald.te +4 -1
@@ -33,7 +33,10 @@ 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 }; -ifdef(`updfstab.te', `domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)') +ifdef(`updfstab.te', ` +domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t) +allow updfstab_t hald_t:dbus { send_msg }; +') ifdef(`udev.te', ` domain_auto_trans(hald_t, udev_exec_t, udev_t) allow udev_t hald_t:unix_dgram_socket sendto;
Index: domains/program/unused/hotplug.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/hotplug.te,v retrieving revision 1.27
program/unused/hotplug.te +0 -1
@@ -137,7 +137,6 @@ ifdef(`udev.te', ` domain_auto_trans(hotplug_t, { udev_exec_t udev_helper_exec_t }, udev_t) -allow hotplug_t udev_helper_exec_t:lnk_file read; ') file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
Index: domains/program/unused/iptables.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/iptables.te,v retrieving revision 1.6
program/unused/iptables.te +2 -4
@@ -23,10 +23,9 @@ # to allow rules to be saved on reboot allow iptables_t initrc_tmp_t:file rw_file_perms; -type iptables_var_run_t, file_type, sysadmfile, pidfile; - domain_auto_trans(iptables_t, ifconfig_exec_t, ifconfig_t) -file_type_auto_trans(iptables_t, var_run_t, iptables_var_run_t, file) +allow iptables_t var_t:dir search; +var_run_domain(iptables) allow iptables_t self:process { fork signal_perms };
@@ -57,4 +56,3 @@ # system-config-network appends to /var/log allow iptables_t var_log_t:file { append }; -allow iptables_t var_t:dir { search };
Index: domains/program/unused/mdadm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/mdadm.te,v retrieving revision 1.7
program/unused/mdadm.te +0 -1
@@ -28,7 +28,6 @@ # Ignore attempts to read every device file dontaudit mdadm_t device_type:{ chr_file blk_file } getattr; dontaudit mdadm_t device_t:{ fifo_file file dir chr_file blk_file } { read getattr }; -dontaudit mdadm_t device_t:dir r_dir_perms; dontaudit mdadm_t devpts_t:dir r_dir_perms; # Ignore attempts to read/write sysadmin tty
Index: domains/program/unused/openca-ca.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/openca-ca.te,v retrieving revision 1.8
program/unused/openca-ca.te +10 -10
@@ -39,11 +39,6 @@ allow httpd_t openca_ca_t:process {transition}; allow httpd_t openca_ca_exec_t:dir r_dir_perms; -############################################################# -# Allow the script access to the library files so it can run -############################################################# -can_exec(openca_ca_t, lib_t) - ################################################################## # Allow the script to get the file descriptor from the http deamon # and send sigchild to http deamon
@@ -52,6 +47,16 @@ allow openca_ca_t httpd_t:fd use; allow openca_ca_t httpd_t:fifo_file {getattr write}; +############################################ +# Allow scripts to append to http logs +######################################### +allow openca_ca_t httpd_log_t:file { append getattr }; + +############################################################# +# Allow the script access to the library files so it can run +############################################################# +can_exec(openca_ca_t, lib_t) + ######################################################################## # The script needs to inherit the file descriptor and find the script it # needs to run
@@ -79,11 +84,6 @@ ############################################################################## allow openca_ca_t openca_ca_exec_t:dir search; -############################################ -# Allow scripts to append to http logs -######################################### -allow openca_ca_t httpd_log_t:file { append getattr }; - # # Allow access to writeable files under /etc/openca #
Index: domains/program/unused/portmap.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/portmap.te,v retrieving revision 1.7
program/unused/portmap.te +1 -0
@@ -26,6 +26,7 @@ # portmap binds to arbitary ports allow portmap_t port_t:{ udp_socket tcp_socket } name_bind; +allow portmap_t reserved_port_t:{ udp_socket tcp_socket } name_bind; allow portmap_t etc_t:file { getattr read };
Index: domains/program/unused/rpm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/rpm.te,v retrieving revision 1.30
program/unused/rpm.te +2 -2
@@ -10,7 +10,7 @@ # var_log_rpm_t is the type for rpm log files (/var/log/rpmpkgs*) # var_lib_rpm_t is the type for rpm files in /var/lib # -type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `, unrestricted, auth_write'); role system_r types rpm_t; uses_shlib(rpm_t) type rpm_exec_t, file_type, sysadmfile, exec_type;
@@ -117,7 +117,7 @@ allow { insmod_t depmod_t } rpm_t:fifo_file rw_file_perms; -type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `, unrestricted, auth_write'); # policy for rpm scriptlet role system_r types rpm_script_t; uses_shlib(rpm_script_t)
Index: domains/program/unused/xdm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/xdm.te,v retrieving revision 1.29
program/unused/xdm.te +1 -0
@@ -29,6 +29,7 @@ allow xdm_t xdm_var_run_t:fifo_file create_file_perms; allow initrc_t xdm_var_run_t:fifo_file unlink; file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, fifo_file) +file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, dir) tmp_domain(xdm) var_lib_domain(xdm)
Index: domains/program/unused/xfs.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/xfs.te,v retrieving revision 1.10
program/unused/xfs.te +0 -1
@@ -40,4 +40,3 @@ # Read /usr/X11R6/lib/X11/fonts/.* and /usr/share/fonts/.* allow xfs_t fonts_t:dir search; allow xfs_t fonts_t:file { getattr read }; -allow xfs_t tmpfs_t:dir { search };
Index: file_contexts/program/mailman.fc
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/file_contexts/program/mailman.fc,v retrieving revision 1.10
program/mailman.fc +0 -3
@@ -4,7 +4,6 @@ /usr/lib/cgi-bin/mailman/.* -- system_u:object_r:mailman_cgi_exec_t /usr/lib/mailman/cron/.* -- system_u:object_r:mailman_queue_exec_t /usr/lib/mailman/mail/wrapper -- system_u:object_r:mailman_mail_exec_t -/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t /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
@@ -14,8 +13,6 @@ ifdef(`distro_redhat', ` /var/mailman/cgi-bin/.* -- system_u:object_r:mailman_cgi_exec_t /var/mailman/data(/.*)? system_u:object_r:mailman_data_t -/var/mailman/pythonlib(/.*)? system_u:object_r:mailman_data_t -/var/mailman/Mailman(/.*)? system_u:object_r:mailman_data_t /var/mailman/locks(/.*)? system_u:object_r:mailman_lock_t /var/mailman/cron -d system_u:object_r:bin_t /var/mailman/cron/.+ -- system_u:object_r:mailman_queue_exec_t
Index: macros/global_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/global_macros.te,v retrieving revision 1.55
global_macros.te +2 -3
@@ -295,7 +295,7 @@ ')dnl end if automount.te ifdef(`targeted_policy', ` dontaudit $1_t devpts_t:chr_file { read write }; -dontaudit $1_t unlabeled_t:file read; +dontaudit $1_t root_t:file { getattr read }; ')dnl end if targeted_policy ')dnl end macro daemon_core_rules
@@ -599,7 +599,6 @@ # Set user information and skip authentication. allow $1 self:passwd *; - allow $1 self:dbus *; allow $1 self:nscd *; -') +')dnl end unconfined_domain
Index: macros/program/screen_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/program/screen_macros.te,v retrieving revision 1.10
program/screen_macros.te +2 -3
@@ -48,9 +48,8 @@ ifdef(`gnome-pty-helper.te', `allow $1_screen_t $1_gph_t:fd use;') allow $1_screen_t $1_home_screen_t:{ file lnk_file } r_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } create_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } { relabelfrom relabelto }; - +allow $1_t $1_home_screen_t:file { create_file_perms relabelfrom relabelto }; +allow $1_t $1_home_screen_t:lnk_file { create_lnk_perms relabelfrom relabelto }; ifdef(`nfs_home_dirs', ` r_dir_file($1_screen_t, nfs_t) ')dnl end if nfs_home_dirs
Index: macros/program/xserver_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/program/xserver_macros.te,v retrieving revision 1.25
program/xserver_macros.te +1 -0
@@ -241,6 +241,7 @@ allow $1_xserver_t var_lib_t:dir search; rw_dir_create_file($1_xserver_t, var_lib_xkb_t) +dontaudit $1_xserver_t selinux_config_t:dir { search }; # for fonts r_dir_file($1_xserver_t, fonts_t)
Re: Previous patch broken.
Quoted 18 lines · James Carter
Mostly Merged. I removed the stuff reverting recent patches from Russell that I just merged.
Below is some comments, and attached is the diff that I merged.
Quoted 9 lines · Daniel J Walsh
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ssh.te policy-1.17.7/domains/program/ssh.te
domains/program/ssh.te +1
-0@@ -232,6 +232,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t)
Quoted 10 lines
domains/program/ssh.te line 238
Quoted 4 lines
domains/program/ssh.te +0
-0# Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.Also added
r_dir_file(sshd_t, self)further up in ssh.te to allow sshd to access/proc/pid/fd. (Why does it want to?)
ssh now reexecs it self in order to increase it's security. Not sure why it wants to access /proc/pid/fd.
Quoted 25 lines
domains/program/syslogd.te line 100
Quoted 12 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/syslogd.te policy-1.17.7/domains/program/syslogd.te
domains/program/syslogd.te +3
-0@@ -95,3 +95,6 @@ # dontaudit syslogd_t file_t:dir search; allow syslogd_t devpts_t:dir { search }; +# For tageted policy tries to read /init +dontaudit syslogd_t root_t:file { getattr read }; +Instead I did:
diff -u -r1.55 global_macros.teglobal_macros.te +0
-0@@ -295,7 +295,7 @@')dnl end if automount.te
ifdef(targeted_policy',
dontaudit $1_t devpts_t:chr_file { read write };global_macros.te +1
-1-dontaudit $1_t unlabeled_t:file read; +dontaudit $1_t root_t:file { getattr read };')dnl end if
targeted_policy
Quoted 4 lines
')dnl end macro
daemon_core_rules
Ok
Quoted 9 lines
Quoted 9 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/apache.te policy-1.17.7/domains/program/unused/apache.te
domains/program/unused/apache.te +1
-0@@ -41,6 +41,7 @@ append_logdir_domain(httpd) #can read /etc/httpd/logs allow httpd_t httpd_log_t:lnk_file { read }; +allow httpd_t httpd_log_t:dir { remove_name };
Quoted 9 lines
domains/program/unused/apache.te line 47
Quoted 4 lines
domains/program/unused/apache.te +0
-0# For /etc/init.d/apache2 reload can_tcp_connect(httpd_t, httpd_t)Do we really want to do this?
Russell?
Quoted 5 lines
Quoted 5 lines
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dbusd.te policy-1.17.7/domains/program/unused/dbusd.te
domains/program/unused/dbusd.te +0
-0@@ -32,3 +32,4 @@
Quoted 11 lines
domains/program/unused/dbusd.te line 35
Quoted 5 lines
domains/program/unused/dbusd.te +1
-0# SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbusd_exec_t, dbusd_t)Steve posted on the list earlier today about this not being desired for the longterm.
Colin is doing a rewrite as we speak.
Quoted 370 lines
------------------------------------------------------------------------
Index: domains/program/crond.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/crond.te,v retrieving revision 1.33
diff -u -r1.33 crond.teprogram/crond.te +0
-0@@ -81,11 +81,13 @@ifdef(
distro_redhat',
# Run the rpm program in therpm_tdomain. Allow creation of RPM log files# via redirection of standard out. +ifdef(`rpm.te', ` allow crond_t rpm_log_t: file create_file_perms;
system_crond_entry(rpm_exec_t, rpm_t)
allowsystem_crond_trpm_log_t:filecreate_file_perms; ')
+')allow
system_crond_tvar_log_t:filer_file_perms;Index: domains/program/ssh.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/ssh.te,v retrieving revision 1.36
diff -u -r1.36 ssh.teprogram/ssh.te +2
-0@@ -147,6 +147,7 @@ # sshd_extern_t is the domain for ssh from outside our network # sshd_program_domain(sshd) +r_dir_file(sshd_t, self) if (ssh_sysadm_login) { sshd_spawn_domain(sshd, userdomain, { sysadm_devpts_t userpty_type }) } else {@@ -232,6 +233,7 @@ # Type for the ssh executable. type ssh_exec_t, file_type, exec_type, sysadmfile; +can_exec(sshd_t, ssh_exec_t) # Everything else is in the ssh_domain macro in # macros/program/ssh_macros.te.Index: domains/program/unused/canna.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/canna.te,v retrieving revision 1.7
diff -u -r1.7 canna.teprogram/unused/canna.te +0
-1@@ -40,4 +40,3 @@ can_unix_connect(i18n_input_t, canna_t) ') -allow canna_t tmp_t:dir search;Index: domains/program/unused/dbusd.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/dbusd.te,v retrieving revision 1.9
diff -u -r1.9 dbusd.teprogram/unused/dbusd.te +1
-0@@ -32,3 +32,4 @@ # SE-DBus specific permissions allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg }; +domain_auto_trans(userdomain, dbusd_exec_t, dbusd_t)Index: domains/program/unused/dovecot.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/dovecot.te,v retrieving revision 1.4
diff -u -r1.4 dovecot.teprogram/unused/dovecot.te +5
-0@@ -19,8 +19,13 @@ allow dovecot_t self:unix_stream_socket create_stream_socket_perms; can_unix_connect(dovecot_t, self) +# For SSL certificates +allow dovecot_t usr_t:file { getattr read }; + allow dovecot_t etc_t:file { getattr read }; allow dovecot_t initrc_var_run_t:file { getattr }; +# Dovecot sub-binaries are lib_t on Debian and bin_t on Fedora +allow dovecot_t lib_t:file { execute execute_no_trans }; allow dovecot_t bin_t:dir { getattr search }; can_exec(dovecot_t, bin_t)Index: domains/program/unused/ftpd.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/ftpd.te,v retrieving revision 1.22
diff -u -r1.22 ftpd.teprogram/unused/ftpd.te +0
-0@@ -101,3 +101,4 @@ allow ftpd_t nfs_t:file r_file_perms; }')dnl end if
nfs_home_dirs
+dontauditftpd_tselinux_config_t:dir { search };
Index: domains/program/unused/hald.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/hald.te,v retrieving revision 1.4
diff -u -r1.4 hald.teprogram/unused/hald.te +4
-1@@ -33,7 +33,10 @@ 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 }; -ifdef(`updfstab.te', `domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)') +ifdef(`updfstab.te', ` +domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t) +allow updfstab_t hald_t:dbus { send_msg }; +')ifdef(
udev.te',domain_auto_trans(hald_t, udev_exec_t, udev_t)
allowudev_thald_t:unix_dgram_socket sendto;
Index: domains/program/unused/hotplug.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/hotplug.te,v retrieving revision 1.27
diff -u -r1.27 hotplug.teprogram/unused/hotplug.te +0
-0@@ -137,7 +137,6 @@ifdef(
udev.te',domain_auto_trans(hotplug_t, { udev_exec_t udev_helper_exec_t }, udev_t)-allowhotplug_tudev_helper_exec_t:lnk_file read;
')
file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
Index: domains/program/unused/iptables.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/iptables.te,v retrieving revision 1.6
diff -u -r1.6 iptables.teprogram/unused/iptables.te +2
-4@@ -23,10 +23,9 @@ # to allow rules to be saved on reboot allow iptables_t initrc_tmp_t:file rw_file_perms; -type iptables_var_run_t, file_type, sysadmfile, pidfile; - domain_auto_trans(iptables_t, ifconfig_exec_t, ifconfig_t) -file_type_auto_trans(iptables_t, var_run_t, iptables_var_run_t, file) +allow iptables_t var_t:dir search; +var_run_domain(iptables) allow iptables_t self:process { fork signal_perms };@@ -57,4 +56,3 @@ # system-config-network appends to /var/log allow iptables_t var_log_t:file { append }; -allow iptables_t var_t:dir { search };Index: domains/program/unused/mdadm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/mdadm.te,v retrieving revision 1.7
diff -u -r1.7 mdadm.teprogram/unused/mdadm.te +0
-1@@ -28,7 +28,6 @@ # Ignore attempts to read every device file dontaudit mdadm_t device_type:{ chr_file blk_file } getattr; dontaudit mdadm_t device_t:{ fifo_file file dir chr_file blk_file } { read getattr }; -dontaudit mdadm_t device_t:dir r_dir_perms; dontaudit mdadm_t devpts_t:dir r_dir_perms; # Ignore attempts to read/write sysadmin ttyIndex: domains/program/unused/openca-ca.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/openca-ca.te,v retrieving revision 1.8
diff -u -r1.8 openca-ca.teprogram/unused/openca-ca.te +10
-10@@ -39,11 +39,6 @@ allow httpd_t openca_ca_t:process {transition}; allow httpd_t openca_ca_exec_t:dir r_dir_perms; -############################################################# -# Allow the script access to the library files so it can run -############################################################# -can_exec(openca_ca_t, lib_t) - ################################################################## # Allow the script to get the file descriptor from the http deamon # and send sigchild to http deamon@@ -52,6 +47,16 @@ allow openca_ca_t httpd_t:fd use; allow openca_ca_t httpd_t:fifo_file {getattr write}; +############################################ +# Allow scripts to append to http logs +######################################### +allow openca_ca_t httpd_log_t:file { append getattr }; + +############################################################# +# Allow the script access to the library files so it can run +############################################################# +can_exec(openca_ca_t, lib_t) + ######################################################################## # The script needs to inherit the file descriptor and find the script it # needs to run@@ -79,11 +84,6 @@ ############################################################################## allow openca_ca_t openca_ca_exec_t:dir search; -############################################ -# Allow scripts to append to http logs -######################################### -allow openca_ca_t httpd_log_t:file { append getattr }; - # # Allow access to writeable files under /etc/openca #Index: domains/program/unused/portmap.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/portmap.te,v retrieving revision 1.7
diff -u -r1.7 portmap.teprogram/unused/portmap.te +1
-0@@ -26,6 +26,7 @@ # portmap binds to arbitary ports allow portmap_t port_t:{ udp_socket tcp_socket } name_bind; +allow portmap_t reserved_port_t:{ udp_socket tcp_socket } name_bind; allow portmap_t etc_t:file { getattr read };Index: domains/program/unused/rpm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/rpm.te,v retrieving revision 1.30
diff -u -r1.30 rpm.teprogram/unused/rpm.te +2
-2@@ -10,7 +10,7 @@ # var_log_rpm_t is the type for rpm log files (/var/log/rpmpkgs*) # var_lib_rpm_t is the type for rpm files in /var/lib # -type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `, unrestricted, auth_write'); role system_r types rpm_t; uses_shlib(rpm_t) type rpm_exec_t, file_type, sysadmfile, exec_type;@@ -117,7 +117,7 @@ allow { insmod_t depmod_t } rpm_t:fifo_file rw_file_perms; -type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `,auth_write, unrestricted'); +type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `, unrestricted, auth_write'); # policy for rpm scriptlet role system_r types rpm_script_t; uses_shlib(rpm_script_t)Index: domains/program/unused/xdm.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/xdm.te,v retrieving revision 1.29
diff -u -r1.29 xdm.teprogram/unused/xdm.te +1
-0@@ -29,6 +29,7 @@ allow xdm_t xdm_var_run_t:fifo_file create_file_perms; allow initrc_t xdm_var_run_t:fifo_file unlink; file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, fifo_file) +file_type_auto_trans(xdm_t, var_run_t, xdm_var_run_t, dir) tmp_domain(xdm) var_lib_domain(xdm)Index: domains/program/unused/xfs.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/domains/program/unused/xfs.te,v retrieving revision 1.10
diff -u -r1.10 xfs.teprogram/unused/xfs.te +0
-1@@ -40,4 +40,3 @@ # Read /usr/X11R6/lib/X11/fonts/.* and /usr/share/fonts/.* allow xfs_t fonts_t:dir search; allow xfs_t fonts_t:file { getattr read }; -allow xfs_t tmpfs_t:dir { search };Index: file_contexts/program/mailman.fc
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/file_contexts/program/mailman.fc,v retrieving revision 1.10
diff -u -r1.10 mailman.fcprogram/mailman.fc +0
-0@@ -4,7 +4,6 @@
/usr/lib/cgi-bin/mailman/.*-- system_u:object_r:mailman_cgi_exec_t/usr/lib/mailman/cron/.*-- system_u:object_r:mailman_queue_exec_t/usr/lib/mailman/mail/wrapper-- system_u:object_r:mailman_mail_exec_t -/usr/lib/mailman/bin/mailmanctl -- system_u:object_r:mailman_mail_exec_t/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_tprogram/mailman.fc +0
-0@@ -14,8 +13,6 @@ifdef(
distro_redhat',/var/mailman/cgi-bin/.*-- system_u:object_r:mailman_cgi_exec_t
/var/mailman/data(/.*)? system_u:object_r:mailman_data_tprogram/mailman.fc +0
-2-/var/mailman/pythonlib(/.*)? system_u:object_r:mailman_data_t -/var/mailman/Mailman(/.*)? system_u:object_r:mailman_data_t/var/mailman/locks(/.*)? system_u:object_r:mailman_lock_t
/var/mailman/cron-d system_u:object_r:bin_t/var/mailman/cron/.+-- system_u:object_r:mailman_queue_exec_t
Index: macros/global_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/global_macros.te,v retrieving revision 1.55
diff -u -r1.55 global_macros.teglobal_macros.te +0
-0@@ -295,7 +295,7 @@')dnl end if automount.te
ifdef(targeted_policy',
dontaudit $1_t devpts_t:chr_file { read write };global_macros.te +1
-1-dontaudit $1_t unlabeled_t:file read; +dontaudit $1_t root_t:file { getattr read };')dnl end if
targeted_policy')dnl end macro
daemon_core_rulesglobal_macros.te +1
-2@@ -599,7 +599,6 @@ # Set user information and skip authentication. allow $1 self:passwd *; - allow $1 self:dbus *; allow $1 self:nscd *; -') +')dnl end unconfined_domainIndex: macros/program/screen_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/program/screen_macros.te,v retrieving revision 1.10
diff -u -r1.10 screen_macros.teprogram/screen_macros.te +2
-3@@ -48,9 +48,8 @@ ifdef(`gnome-pty-helper.te', `allow $1_screen_t $1_gph_t:fd use;') allow $1_screen_t $1_home_screen_t:{ file lnk_file } r_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } create_file_perms; -allow $1_t $1_home_screen_t:{ file lnk_file } { relabelfrom relabelto }; - +allow $1_t $1_home_screen_t:file { create_file_perms relabelfrom relabelto }; +allow $1_t $1_home_screen_t:lnk_file { create_lnk_perms relabelfrom relabelto };ifdef(
nfs_home_dirs',r_dir_file($1_screen_t, nfs_t)
')dnl end ifnfs_home_dirs
Index: macros/program/xserver_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/program/xserver_macros.te,v retrieving revision 1.25
diff -u -r1.25 xserver_macros.te
program/xserver_macros.te line 247
Quoted 7 lines
program/xserver_macros.te +1
-0@@ -241,6 +241,7 @@ allow $1_xserver_t var_lib_t:dir search; rw_dir_create_file($1_xserver_t, var_lib_xkb_t) +dontaudit $1_xserver_t selinux_config_t:dir { search }; # for fonts r_dir_file($1_xserver_t, fonts_t)
--
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.