policy patches
Subsystems (2)
diff1 makes the Makefile use M4PARAM for the file_contexts.
It makes a trivial change to fsadm_t access which satisfies some of the assertions I test with (no difference in production).
Removes devpts access from getty_t (it has no business doing such things, any time it tries to do so is a bug somewhere).
Makes a change to initrc_t needed for cryptsetup on Debian (unsure whether cryptsetup on Fedora will work the same way, it's quite likely - I think it's best if we copy the Debian cryptsetup stuff into Fedora).
Also it removes boot_t:lnk_file access from klogd_t, on Fedora the only boot_t:lnk_file is the GRUB menu.lst file (which klogd does not need access to), on Debian there are also some sym-links for LILO (which are in the same category).
diff makes some minor changes to the passwd policy to work with different editors for vipw and different versions of chfn.
Allows acct_t to execute logrotate.
Works with the latest version of amavis.
Fixes the apmd policy to work with the device_type changes and some functionality that is commonly called from apm scripts.
Changes the capabilities in bluetooth.te to be in the same order as the header file.
Updates the calamaris policy to work with the latest version.
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
Makefile renamed from usr/src/se/policy/Makefile +1 -1
@@ -140,7 +140,7 @@ $(FC): $(FCFILES) $(ALL_TUNABLES) domains/program domains/misc file_contexts/program file_contexts/misc users /etc/passwd @echo "Building file_contexts ..." - @m4 $(ALL_TUNABLES) $(FCFILES) > [email protected] + @m4 $(M4PARAM) $(ALL_TUNABLES) $(FCFILES) > [email protected] @grep -v "^/root" [email protected] > [email protected] @/usr/sbin/genhomedircon . [email protected] > $@ @grep "^/root" [email protected] >> $@
domains/program/fsadm.te renamed from usr/src/se/policy/domains/program/fsadm.te +2 -1
@@ -84,7 +84,8 @@ # Access lost+found. allow fsadm_t lost_found_t:dir create_dir_perms; -allow fsadm_t lost_found_t:notdevfile_class_set create_file_perms; +allow fsadm_t lost_found_t:{ file sock_file fifo_file } create_file_perms; +allow fsadm_t lost_found_t:lnk_file create_lnk_perms; allow fsadm_t file_t:dir { search read getattr rmdir create };
domains/program/getty.te renamed from usr/src/se/policy/domains/program/getty.te +0 -2
@@ -52,8 +52,6 @@ # Chown, chmod, read and write ttys. allow getty_t tty_device_t:chr_file { setattr rw_file_perms }; allow getty_t ttyfile:chr_file { setattr rw_file_perms }; -allow getty_t initrc_devpts_t:chr_file { setattr rw_file_perms }; -dontaudit getty_t { user_devpts_t sysadm_devpts_t }:chr_file { read write }; # for error condition handling allow getty_t fs_t:filesystem getattr;
domains/program/initrc.te renamed from usr/src/se/policy/domains/program/initrc.te +4 -1
@@ -164,7 +164,10 @@ allow initrc_t pidfile:file { getattr read unlink }; # Write to /dev/urandom. -allow initrc_t urandom_device_t:chr_file rw_file_perms; +allow initrc_t { random_device_t urandom_device_t }:chr_file rw_file_perms; + +# for cryptsetup +allow initrc_t fixed_disk_device_t:blk_file getattr; # Set device ownerships/modes. allow initrc_t framebuf_device_t:lnk_file read;
domains/program/klogd.te renamed from usr/src/se/policy/domains/program/klogd.te +0 -2
@@ -43,5 +43,3 @@ # Read /boot/System.map* allow klogd_t system_map_t:file r_file_perms; allow klogd_t boot_t:dir r_dir_perms; -allow klogd_t boot_t:lnk_file { read }; -
domains/program/passwd.te renamed from usr/src/se/policy/domains/program/passwd.te +13 -3
@@ -35,6 +35,9 @@ allow $1_t etc_t:file create_file_perms; +# read /etc/mtab +allow $1_t etc_runtime_t:file { getattr read }; + # Allow etc_t symlinks for /etc/alternatives on Debian. allow $1_t etc_t:lnk_file read;
@@ -87,8 +90,8 @@ dontaudit chfn_t shadow_t:file read; allow chfn_t etc_t:dir rw_dir_perms; allow chfn_t etc_t:file create_file_perms; -allow chfn_t proc_t:file { read }; -allow chfn_t chfn_t:file { write }; +allow chfn_t proc_t:file { getattr read }; +allow chfn_t self:file { write }; in_user_role(passwd_t) in_user_role(chfn_t)
@@ -118,9 +121,10 @@ ') # allow vipw to exec the editor -allow sysadm_passwd_t { root_t usr_t bin_t }:dir search; +allow sysadm_passwd_t { root_t bin_t sbin_t }:dir search; allow sysadm_passwd_t { bin_t }:lnk_file read; can_exec(sysadm_passwd_t, { shell_exec_t bin_t }) +r_dir_file(sysadm_passwd_t, usr_t) # allow vipw to create temporary files under /var/tmp/vi.recover allow sysadm_passwd_t var_t:dir search;
@@ -133,6 +137,12 @@ # for nscd lookups dontaudit sysadm_passwd_t var_run_t:dir search; +# for /proc/meminfo +allow sysadm_passwd_t proc_t:file { getattr read }; + +dontaudit sysadm_passwd_t selinux_config_t:dir search; +dontaudit sysadm_passwd_t devpts_t:dir search; + # make sure that getcon succeeds allow passwd_t userdomain:dir search; allow passwd_t userdomain:file read;
domains/program/unused/acct.te renamed from usr/src/se/policy/domains/program/unused/acct.te +1 -1
@@ -22,7 +22,7 @@ allow acct_t urandom_device_t:chr_file read; ifdef(`logrotate.te', ` -allow acct_t logrotate_exec_t:file getattr; +can_exec(acct_t, logrotate_exec_t) r_dir_file(logrotate_t, acct_data_t) ')
domains/program/unused/amavis.te renamed from usr/src/se/policy/domains/program/unused/amavis.te +2 -0
@@ -20,8 +20,10 @@ allow initrc_t amavisd_lib_t:file unlink; allow initrc_t amavisd_var_run_t:dir setattr; allow amavisd_t self:capability { chown dac_override setgid setuid }; +dontaudit amavisd_t self:capability sys_tty_config; allow amavisd_t usr_t:{ file lnk_file } { getattr read }; +dontaudit amavisd_t usr_t:file ioctl; # networking can_network(amavisd_t)
domains/program/unused/apmd.te renamed from usr/src/se/policy/domains/program/unused/apmd.te +12 -2
@@ -72,12 +72,13 @@ # setuid for fuser, dac* for ps dontaudit apmd_t self:capability { setuid dac_override dac_read_search }; dontaudit apmd_t domain:{ socket_class_set } getattr; -dontaudit apmd_t { file_type fs_type }:dir_file_class_set getattr; +dontaudit apmd_t { file_type fs_type }:notdevfile_class_set getattr; +dontaudit apmd_t device_type:devfile_class_set getattr; dontaudit apmd_t home_type:dir { search getattr }; dontaudit apmd_t domain:key_socket getattr; dontaudit apmd_t domain:dir search; -ifdef(`redhat', ` +ifdef(`redhat', ` can_exec(apmd_t, apmd_var_run_t) # for /var/lock/subsys/network rw_dir_create_file(apmd_t, var_lock_t)
@@ -108,7 +109,16 @@ # Same for apm/acpid scripts domain_auto_trans(apmd_t, initrc_exec_t, initrc_t) +ifdef(`consoletype.te', ` +allow consoletype_t apmd_t:fd use; +allow consoletype_t apmd_t:fifo_file write; +') +ifdef(`mount.te', `allow mount_t apmd_t:fd use;') +ifdef(`crond.te', `domain_auto_trans(apmd_t, anacron_exec_t, system_crond_t)') ifdef(`mta.te', ` domain_auto_trans(apmd_t, sendmail_exec_t, system_mail_t) ') + +# for a find /dev operation that gets /dev/shm +dontaudit apmd_t tmpfs_t:dir r_dir_perms;
domains/program/unused/backup.te renamed from usr/src/se/policy/domains/program/unused/backup.te +3 -0
@@ -23,6 +23,9 @@ rw_dir_create_file(system_crond_t, backup_store_t) ') +# for SSP +allow backup_t urandom_device_t:chr_file read; + can_network(backup_t) uses_shlib(backup_t)
domains/program/unused/bluetooth.te renamed from usr/src/se/policy/domains/program/unused/bluetooth.te +1 -1
@@ -15,7 +15,7 @@ tmp_domain(bluetooth) # Use capabilities. -allow bluetooth_t self:capability { net_raw sys_tty_config net_admin }; +allow bluetooth_t self:capability { net_admin net_raw sys_tty_config }; rw_dir_create_file(bluetooth_t, var_lock_t)
domains/program/unused/calamaris.te renamed from usr/src/se/policy/domains/program/unused/calamaris.te +5 -0
@@ -21,6 +21,8 @@ allow calamaris_t var_log_squid_t:dir search; allow calamaris_t var_log_squid_t:file { getattr read }; allow calamaris_t { usr_t lib_t }:file { getattr read }; +allow calamaris_t usr_t:lnk_file { getattr read }; +dontaudit calamaris_t usr_t:file ioctl; type calamaris_www_t, file_type, sysadmfile; ifdef(`apache.te', `
@@ -36,10 +38,13 @@ allow calamaris_t device_t:dir search; allow calamaris_t devtty_t:chr_file { read write }; +allow calamaris_t urandom_device_t:chr_file { getattr read }; + allow calamaris_t self:process { fork signal_perms setsched }; allow calamaris_t { proc_t sysctl_kernel_t }:dir search; allow calamaris_t { proc_t sysctl_kernel_t }:file { getattr read }; allow calamaris_t { proc_t self }:lnk_file read; +allow calamaris_t self:dir search; allow calamaris_t { bin_t sbin_t }:dir search; allow calamaris_t bin_t:lnk_file read;
Quoted 25 lines · Russell Coker
diff1 makes the
Makefileuse M4PARAM for thefile_contexts.It makes a trivial change to
fsadm_taccess which satisfies some of the assertions I test with (no difference in production).Removes devpts access from
getty_t(it has no business doing such things, any time it tries to do so is a bug somewhere).Makes a change to
initrc_tneeded for cryptsetup on Debian (unsure whether cryptsetup on Fedora will work the same way, it's quite likely - I think it's best if we copy the Debian cryptsetup stuff into Fedora).Also it removes boot_t:lnk_file access from
klogd_t, on Fedora the only boot_t:lnk_file is the GRUB menu.lst file (which klogd does not need access to), on Debian there are also some sym-links for LILO (which are in the same category).diff makes some minor changes to the passwd policy to work with different editors for vipw and different versions of chfn.
Allows
acct_tto execute logrotate.Works with the latest version of amavis.
Quoted 7 lines
Fixes the apmd policy to work with the
device_typechanges and some functionality that is commonly called from apm scripts.Changes the capabilities in bluetooth.te to be in the same order as the header file.
Updates the calamaris policy to work with the latest version.
Merged.
Signature · 8 lines
Stephen Smalley <[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.