policy patches
Subsystems (2)
I can't reproduce syslogd_t getting access to a kernel_t fd, so I removed the rules relating to that (I think it was a kernel bug that has since been fixed).
kudzu needs to execute /sbin/init to enable/disable serial console.
nash needs to read /dev/mapper/control (temporary thing, hopefully udev will take care of this soon).
Removed a redundant rule from postfix.te and some redundant rules from quota.te .
Added some extra rules to rpm.te for the most strict configuration and added sysadmfile to rpmbuild_exec_t.
Allow udev to execute more types to prepare for removing can_exec_any.
Added a new fc entry for cups so that hal can detect a new printer and add it.
kmodule is part of kudzu.
More name change stuff netsaint -> nagios.
Added start_udev to udev.fc.
Fixed home directory labelling for uml.
Added quagga entries to zebra.fc. Maybe we should rename the policy from zebra to quagga too.
Added some ifdef(`targeted_policy' conditionals where needed.
Removed a reference to tmp_t:lnk_file, there should never be a tmp_t:lnk_file in the strict policy (and targetted has no mozilla policy).
Updated ssh_agent_macros.te with the latest stuff from Thomas Bleher. Also gave him full credit (I don't recall doing anything significant with that file).
Allow ssh client to execute bash. ssh client can use the shell to launch scripts and this can be defined in ~/.ssh/config .
Removed a reference to user_home_dir_t from xserver_macros.te. Any time a policy has a reference to user_t, user_home_dir_t, etc it's a bug.
Removed a line giving xdm access to the NVIDIA device node. xdm has no business with that, it's for the X server.
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
domains/program/initrc.te renamed from usr/src/se/policy/domains/program/initrc.te +1 -1
@@ -219,7 +219,7 @@ allow initrc_t var_lib_rpm_t:dir rw_dir_perms; allow initrc_t var_lib_rpm_t:file create_file_perms; ') -') +')dnl end distro_redhat allow initrc_t system_map_t:{ file lnk_file } r_file_perms;
domains/program/syslogd.te renamed from usr/src/se/policy/domains/program/syslogd.te +0 -3
@@ -95,6 +95,3 @@ # dontaudit syslogd_t file_t:dir search; allow syslogd_t devpts_t:dir { search }; - -dontaudit syslogd_t kernel_t:fd use; -dontaudit syslogd_t kernel_t:file read;
domains/program/unused/kudzu.te renamed from usr/src/se/policy/domains/program/unused/kudzu.te +1 -1
@@ -50,7 +50,7 @@ rw_dir_create_file(kudzu_t, etc_t) rw_dir_create_file(kudzu_t, mnt_t) -can_exec(kudzu_t, { bin_t sbin_t }) +can_exec(kudzu_t, { bin_t sbin_t init_exec_t }) # Read /usr/lib/gconv/gconv-modules.* allow kudzu_t lib_t:file { read getattr }; # Read /usr/share/hwdata/.* and /usr/share/terminfo/l/linux
domains/program/unused/lvm.te renamed from usr/src/se/policy/domains/program/unused/lvm.te +1 -1
@@ -110,7 +110,7 @@ allow lvm_t sbin_t:dir search; dontaudit lvm_t sbin_t:file getattr; allow lvm_t lvm_control_t:chr_file rw_file_perms; -allow initrc_t lvm_control_t:chr_file { getattr unlink }; +allow initrc_t lvm_control_t:chr_file { getattr read unlink }; allow initrc_t device_t:chr_file create; dontaudit lvm_t var_run_t:dir getattr;
domains/program/unused/postfix.te renamed from usr/src/se/policy/domains/program/unused/postfix.te +0 -1
@@ -100,7 +100,6 @@ ') allow postfix_master_t sendmail_exec_t:file r_file_perms; allow postfix_master_t sbin_t:lnk_file { getattr read }; -domain_auto_trans(initrc_t, postfix_master_exec_t, postfix_master_t) ifdef(`pppd.te', ` domain_auto_trans(pppd_t, postfix_master_exec_t, postfix_master_t) ')
domains/program/unused/quota.te renamed from usr/src/se/policy/domains/program/unused/quota.te +0 -4
@@ -17,10 +17,6 @@ role sysadm_r types quota_t; allow quota_t admin_tty_type:chr_file { read write }; -domain_auto_trans(sysadm_t, quota_exec_t, quota_t) -role sysadm_r types quota_t; -allow quota_t admin_tty_type:chr_file { read write }; - type quota_flag_t, file_type, sysadmfile; type quota_db_t, file_type, sysadmfile;
domains/program/unused/rpm.te renamed from usr/src/se/policy/domains/program/unused/rpm.te +7 -1
@@ -16,9 +16,15 @@ type rpm_exec_t, file_type, sysadmfile, exec_type; general_domain_access(rpm_t) +can_ps(rpm_t, domain) +allow rpm_t self:process setrlimit; system_crond_entry(rpm_exec_t, rpm_t) role sysadm_r types rpm_t; domain_auto_trans(sysadm_t, rpm_exec_t, rpm_t) +ifdef(`unlimitedUsers', ` +role staff_r types rpm_t; +domain_auto_trans(staff_t, rpm_exec_t, rpm_t) +') type rpm_file_t, file_type, sysadmfile;
@@ -239,7 +245,7 @@ allow rpm_t rpc_pipefs_t:dir search; allow rpm_script_t init_t:dir search; -type rpmbuild_exec_t, file_type, exec_type; +type rpmbuild_exec_t, file_type, sysadmfile, exec_type; type rpmbuild_t, domain; allow rpmbuild_t policy_config_t:dir { search }; allow rpmbuild_t policy_src_t:dir { search };
domains/program/unused/udev.te renamed from usr/src/se/policy/domains/program/unused/udev.te +2 -0
@@ -42,6 +42,8 @@ allow udev_t { bin_t sbin_t }:dir r_dir_perms; allow udev_t { sbin_t bin_t }:lnk_file read; 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) r_dir_file(udev_t, sysfs_t) allow udev_t sysadm_tty_device_t:chr_file { read write };
file_contexts/program/cups.fc renamed from usr/src/se/policy/file_contexts/program/cups.fc +1 -0
@@ -18,6 +18,7 @@ /usr/lib(64)?/cups/backend/.* -- system_u:object_r:cupsd_exec_t /usr/lib(64)?/cups/daemon/.* -- system_u:object_r:cupsd_exec_t /usr/sbin/cupsd -- system_u:object_r:cupsd_exec_t +/usr/bin/cups-config-daemon -- system_u:object_r:cupsd_exec_t /usr/sbin/printconf-backend -- system_u:object_r:cupsd_exec_t /var/log/cups(/.*)? system_u:object_r:cupsd_log_t /var/spool/cups(/.*)? system_u:object_r:print_spool_t
file_contexts/program/kudzu.fc renamed from usr/src/se/policy/file_contexts/program/kudzu.fc +1 -0
@@ -1,2 +1,3 @@ # kudzu /usr/sbin/kudzu -- system_u:object_r:kudzu_exec_t +/sbin/kmodule -- system_u:object_r:kudzu_exec_t
file_contexts/program/nagios.fc renamed from usr/src/se/policy/file_contexts/program/nagios.fc +7 -4
@@ -1,7 +1,10 @@ -# netsaint - network monitoring server -/usr/sbin/netsaint -- system_u:object_r:nagios_exec_t -#/var/run/netsaint(/.*)? system_u:object_r:nagios_var_run_t -/etc/netsaint(/.*)? system_u:object_r:nagios_etc_t +# nagios - network monitoring server /var/log/netsaint(/.*)? system_u:object_r:nagios_log_t /usr/lib(64)?/netsaint/plugins(/.*)? system_u:object_r:bin_t /usr/lib(64)?/cgi-bin/netsaint/.+ -- system_u:object_r:nagios_cgi_exec_t +# nagios +/usr/bin/nagios -- system_u:object_r:nagios_exec_t +/etc/nagios(/.*)? system_u:object_r:nagios_etc_t +/var/log/nagios(/.*)? system_u:object_r:nagios_log_t +/usr/lib(64)?/nagios/plugins(/.*)? system_u:object_r:bin_t +/usr/lib(64)?/nagios/cgi/.+ -- system_u:object_r:nagios_cgi_exec_t
file_contexts/program/udev.fc renamed from usr/src/se/policy/file_contexts/program/udev.fc +1 -0
@@ -2,6 +2,7 @@ /sbin/udevsend -- system_u:object_r:udev_exec_t /sbin/udev -- system_u:object_r:udev_exec_t /sbin/udevd -- system_u:object_r:udev_exec_t +/sbin/start_udev -- 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/udev/scripts/.+ -- system_u:object_r:udev_helper_exec_t
file_contexts/program/uml.fc renamed from usr/src/se/policy/file_contexts/program/uml.fc +1 -1
@@ -1,4 +1,4 @@ # User Mode Linux /usr/bin/uml_switch -- system_u:object_r:uml_switch_exec_t /var/run/uml-utilities(/.*)? system_u:object_r:uml_switch_var_run_t -/home/[^/]+/.uml(/.*)? system_u:object_r:user_uml_rw_t +HOME_DIR/\.uml(/.*)? system_u:object_r:ROLE_uml_rw_t
file_contexts/program/zebra.fc renamed from usr/src/se/policy/file_contexts/program/zebra.fc +6 -0
@@ -5,3 +5,9 @@ /etc/zebra(/.*)? system_u:object_r:zebra_conf_t /var/run/.zserv -s system_u:object_r:zebra_var_run_t /var/run/.zebra -s system_u:object_r:zebra_var_run_t +# Quagga +/usr/sbin/rip.* -- system_u:object_r:zebra_exec_t +/usr/sbin/ospf.* -- system_u:object_r:zebra_exec_t +/etc/quagga(/.*)? system_u:object_r:zebra_conf_t +/var/log/quagga(/.*)? system_u:object_r:zebra_log_t +/var/run/quagga(/.*)? system_u:object_r:zebra_var_run_t
macros/admin_macros.te renamed from usr/src/se/policy/macros/admin_macros.te +4 -0
@@ -77,6 +77,10 @@ allow $1_t sysadmfile:lnk_file create_lnk_perms; allow $1_t sysadmfile:dir create_dir_perms; +# for lsof +allow $1_t mtrr_device_t:file getattr; +allow $1_t fs_type:dir getattr; + # Set an exec context, e.g. for runcon. can_setexec($1_t)
macros/program/chkpwd_macros.te renamed from usr/src/se/policy/macros/program/chkpwd_macros.te +2 -0
@@ -51,7 +51,9 @@ allow $1_chkpwd_t etc_t:file { getattr read }; allow $1_chkpwd_t self:unix_dgram_socket create_socket_perms; allow $1_chkpwd_t self:unix_stream_socket create_socket_perms; +ifdef(`targeted_policy', ` allow $1_chkpwd_t tty_device_t:chr_file { read write }; +') read_locale($1_chkpwd_t) # Use capabilities.
macros/program/mozilla_macros.te renamed from usr/src/se/policy/macros/program/mozilla_macros.te +0 -2
@@ -71,8 +71,6 @@ allow $1_lpr_t $1_mozilla_rw_t:file rw_file_perms; ') -dontaudit $1_mozilla_t tmp_t:lnk_file read; - # # This is another place where I sould like to allow system customization. # We need to allow the admin to select whether then want to allow mozilla
macros/program/ssh_agent_macros.te renamed from usr/src/se/policy/macros/program/ssh_agent_macros.te +5 -3
@@ -3,8 +3,7 @@ # # -# Authors: Russell Coker <[email protected]>, -# Thomas Bleher <[email protected]> +# Author: Thomas Bleher <[email protected]> # #
@@ -70,7 +69,10 @@ can_unix_connect($1_t, $1_ssh_agent_t) # transition back to normal privs upon exec -domain_auto_trans($1_ssh_agent_t, { bin_t shell_exec_t $1_home_t ifdef(`nfs_home_dirs', `nfs_t')}, $1_t) +domain_auto_trans($1_ssh_agent_t, { bin_t shell_exec_t $1_home_t }, $1_t) +ifdef(`nfs_home_dirs', ` +domain_auto_trans($1_ssh_agent_t, nfs_t, $1_t) +') allow $1_ssh_agent_t bin_t:dir search; # allow reading of /usr/bin/X11 (is a symlink)
macros/program/ssh_macros.te renamed from usr/src/se/policy/macros/program/ssh_macros.te +1 -0
@@ -118,6 +118,7 @@ # for /bin/sh used to execute xauth dontaudit $1_ssh_t proc_t:dir search; dontaudit $1_ssh_t proc_t:file { getattr read }; +can_exec($1_ssh_t, shell_exec_t) # Inherit and use descriptors from gnome-pty-helper. ifdef(`gnome-pty-helper.te', `allow $1_ssh_t $1_gph_t:fd use;')
macros/program/xserver_macros.te renamed from usr/src/se/policy/macros/program/xserver_macros.te +0 -2
@@ -64,7 +64,6 @@ allow xdm_xserver_t init_t:fd use; -dontaudit xdm_xserver_t user_home_dir_t:dir { read search }; dontaudit xdm_xserver_t sysadm_home_dir_t:dir { read search }; ', ` # The user role is authorized for this domain.
@@ -162,7 +161,6 @@ ifdef(`xdm.te', ` allow $1_t xdm_tmp_t:sock_file { unlink }; allow $1_xserver_t xdm_var_run_t:dir { search }; -allow xdm_t xserver_misc_device_t:chr_file { getattr }; # for /tmp/.ICE-unix file_type_auto_trans($1_t, xdm_xserver_tmp_t, $1_tmp_t, sock_file) ')
domains/program/unused/rpm.te line 27
Quoted 9 lines · Russell Coker
diff -ru
/usr/src/se/policy/domains/program/unused/rpm.te./domains/program/unused/rpm.tedomains/program/unused/rpm.te renamed from usr/src/se/policy/domains/program/unused/rpm.te +4
-0@@ -16,9 +16,15 @@ +ifdef(`unlimitedUsers', ` +role staff_r types rpm_t; +domain_auto_trans(staff_t, rpm_exec_t, rpm_t) +')
AFAIK unlimitedUsers was removed recently, so this snippet makes no sense anymore.
Quoted 8 lines
diff -ru
/usr/src/se/policy/file_contexts/program/nagios.fc./file_contexts/program/nagios.fcfile_contexts/program/nagios.fc renamed from usr/src/se/policy/file_contexts/program/nagios.fc +0
-4@@ -1,7 +1,10 @@ -# netsaint - network monitoring server -/usr/sbin/netsaint -- system_u:object_r:nagios_exec_t -#/var/run/netsaint(/.*)? system_u:object_r:nagios_var_run_t -/etc/netsaint(/.*)? system_u:object_r:nagios_etc_t
file_contexts/program/nagios.fc line 10
Quoted 10 lines
file_contexts/program/nagios.fc renamed from usr/src/se/policy/file_contexts/program/nagios.fc +7
-0+# nagios - network monitoring server /var/log/netsaint(/.*)? system_u:object_r:nagios_log_t /usr/lib(64)?/netsaint/plugins(/.*)? system_u:object_r:bin_t /usr/lib(64)?/cgi-bin/netsaint/.+ -- system_u:object_r:nagios_cgi_exec_t +# nagios +/usr/bin/nagios -- system_u:object_r:nagios_exec_t +/etc/nagios(/.*)? system_u:object_r:nagios_etc_t +/var/log/nagios(/.*)? system_u:object_r:nagios_log_t +/usr/lib(64)?/nagios/plugins(/.*)? system_u:object_r:bin_t +/usr/lib(64)?/nagios/cgi/.+ -- system_u:object_r:nagios_cgi_exec_t
On Debian, it's/usr/sbin/nagios -- system_u:object_r:nagios_exec_t
and/usr/lib/cgi-bin/nagios -- system_u:object_r:nagios_cgi_exec_t
These should be added also.
Everything else looks fine.
Thomas
Signature · 7 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA D09E C562 2BAE B2F4 ABE7 -- 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 7 lines · Thomas Bleher
domains/program/unused/rpm.te line 27
Quoted 4 lines
domains/program/unused/rpm.te renamed from usr/src/se/policy/domains/program/unused/rpm.te +4
-0+ifdef(`unlimitedUsers', ` +role staff_r types rpm_t; +domain_auto_trans(staff_t, rpm_exec_t, rpm_t) +')AFAIK unlimitedUsers was removed recently, so this snippet makes no sense anymore.
Thanks, I've removed that from my tree.
Quoted 6 lines
On Debian, it's
/usr/sbin/nagios-- system_u:object_r:nagios_exec_t
and/usr/lib/cgi-bin/nagios-- system_u:object_r:nagios_cgi_exec_tThese should be added also.
Thanks for that. I've attached a new nagios.fc with that change.
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
# nagios - network monitoring server /var/log/netsaint(/.*)? system_u:object_r:nagios_log_t /usr/lib(64)?/netsaint/plugins(/.*)? system_u:object_r:bin_t /usr/lib(64)?/cgi-bin/netsaint/.+ -- system_u:object_r:nagios_cgi_exec_t # nagios ifdef(`distro_debian', ` /usr/sbin/nagios -- system_u:object_r:nagios_exec_t /usr/lib/cgi-bin/nagios/.+ -- system_u:object_r:nagios_cgi_exec_t ', ` /usr/bin/nagios -- system_u:object_r:nagios_exec_t /usr/lib(64)?/nagios/cgi/.+ -- system_u:object_r:nagios_cgi_exec_t ') /etc/nagios(/.*)? system_u:object_r:nagios_etc_t /var/log/nagios(/.*)? system_u:object_r:nagios_log_t /usr/lib(64)?/nagios/plugins(/.*)? system_u:object_r:bin_t
Mostly merged with the corrections.
These two lines caused things to break, so I held off merging these for now.
+/sbin/kmodule -- system_u:object_r:kudzu_exec_t
+/sbin/start_udev -- system_u:object_r:udev_exec_t
These are the denials I am seeing:
avc: denied { unlink } for pid=705 exe=/bin/rm name=.udev.tdb dev=tmpfs ino=927 scontext=system_u:system_r:udev_t tcontext=system_u:object_r:tmpfs_t tclass=file
avc: denied { read write } for pid=707 exe=/sbin/udev name=.udev.tdb dev=tmpfs ino=927 scontext=system_u:system_r:udev_t tcontext=system_u:object_r:tmpfs_t tclass=file
avc: denied { search } for pid=856 exe=/sbin/kmodule name=usr dev=hda2 ino=162881 scontext=system_u:system_r:kudzu_t tcontext=user_u:object_r:file_t tclass=dir
avc: denied { getattr } for pid=856 exe=/sbin/kmodule path=/lib/modules/2.6.8-1.541/kernel dev=hda2 ino=930725 scontext=system_u:system_r:kudzu_t tcontext=system_u:object_r:modules_object_t tclass=dir
avc: denied { setattr } for pid=2402 exe=/usr/X11R6/bin/Xorg name=dri dev=tmpfs ino=7757 scontext=system_u:system_r:xdm_xserver_t tcontext=system_u:object_r:device_t tclass=dirThe udev_t tmpfs_t:file { read write } denial occurs a lot.
The xdm_xserver_t device_t:dir setattr denial is not due to this patch. It is the only denial that I have been seeing lately; I just haven't had an opportunity to look into it more. It doesn't appear to cause any problems though.
Quoted 20 lines · Russell Coker
Quoted 7 lines · Thomas Bleher
domains/program/unused/rpm.te line 27
Quoted 4 lines
domains/program/unused/rpm.te renamed from usr/src/se/policy/domains/program/unused/rpm.te +4
-0+ifdef(`unlimitedUsers', ` +role staff_r types rpm_t; +domain_auto_trans(staff_t, rpm_exec_t, rpm_t) +')AFAIK unlimitedUsers was removed recently, so this snippet makes no sense anymore.
Thanks, I've removed that from my tree.
Quoted 6 lines
On Debian, it's
/usr/sbin/nagios-- system_u:object_r:nagios_exec_t
and/usr/lib/cgi-bin/nagios-- system_u:object_r:nagios_cgi_exec_tThese should be added also.
Thanks for that. I've attached a new nagios.fc with that change.
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
Mostly merged with the corrections.
These two lines caused things to break, so I held off merging these for now.
(quoted diff) +2
-0+/sbin/kmodule -- system_u:object_r:kudzu_exec_t +/sbin/start_udev -- system_u:object_r:udev_exec_tThese are the denials I am seeing:
avc: denied { unlink } for pid=705 exe=/bin/rm name=.udev.tdb dev=tmpfs ino=927 scontext=system_u:system_r:udev_t
Version 7.85-1 of the initscripts package fixes the restorecon command to use the -R option to label all of /dev. If you upgrade to the latest rawhide then the start_udev labelling should work. NB I sent the patch to you before rawhide was fixed, this was intentional as neither patch worked well without the other so there was no benefit in delaying.
Quoted 3 lines
avc: denied { search } for pid=856 exe=/sbin/kmodule name=usr dev=hda2 ino=162881 scontext=system_u:system_r:kudzu_t tcontext=user_u:object_r:file_t tclass=dir
Looks like either mis-labelling or you have /usr on a different file system. I guess we have to add a dontaudit rule for that for when /usr (or /var or whatever else it may access that isn't on the root fs).
Quoted 4 lines
avc: denied { getattr } for
pid=856 exe=/sbin/kmodule path=/lib/modules/2.6.8-1.541/kernel dev=hda2 ino=930725 scontext=system_u:system_r:kudzu_t tcontext=system_u:object_r:modules_object_t tclass=dir
I've attached kudzu.diff to deal with this issue and the above. Please try including those file contexts changes, with kudzu.diff and the latest initscripts it should be fine.
Quoted 4 lines
avc: denied {
setattr } for pid=2402 exe=/usr/X11R6/bin/Xorg name=dri dev=tmpfs ino=7757 scontext=system_u:system_r:xdm_xserver_t tcontext=system_u:object_r:device_t tclass=dir
I think that Dan's latest patch allowed that one.
Quoted 4 lines
The
xdm_xserver_tdevice_t:dir setattr denial is not due to this patch. It is the only denial that I have been seeing lately; I just haven't had an opportunity to look into it more. It doesn't appear to cause any problems though.
Long term udev has to deal with that too. The X server should not be creating device nodes. Quite a bit of work has recently gone into reducing /dev/mem access but allowing arbitrary device node creation wastes that. It'll be fixed eventually (but at the moment we are already busy enough with udev issues).
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
program/unused/kudzu.te renamed from usr/src/se/policy/domains/program/unused/kudzu.te +4 -1
@@ -15,7 +15,7 @@ allow kudzu_t etc_t:file { getattr read }; allow kudzu_t self:capability { dac_override sys_admin sys_rawio net_admin sys_tty_config }; allow kudzu_t modules_conf_t:file { getattr read }; -allow kudzu_t modules_object_t:dir { search }; +allow kudzu_t modules_object_t:dir { getattr search }; allow kudzu_t modules_dep_t:file { getattr read }; allow kudzu_t mouse_device_t:chr_file { read write }; allow kudzu_t proc_t:file { getattr read };
@@ -81,3 +81,6 @@ file_type_auto_trans(kudzu_t, etc_t, etc_runtime_t, file) allow kudzu_t tape_device_t:chr_file r_file_perms; allow kudzu_t tmp_t:dir { search }; + +# for file systems that are not yet mounted +dontaudit kudzu_t file_t:dir search;
Cleaned up patch with some of russells changes.
chage has been updated to do a checkPasswdAccess(PASSWD__ROOTOK) now.
domains/program/getty.te +1 -0
@@ -58,3 +58,4 @@ rw_dir_create_file(getty_t, var_lock_t) r_dir_file(getty_t, sysfs_t) +allow getty_t initrc_devpts_t:chr_file { read write };
domains/program/passwd.te +1 -1
@@ -42,7 +42,7 @@ allow $1_t etc_t:lnk_file read; # Use capabilities. -allow $1_t self:capability { chown dac_override fsetid setuid sys_resource }; +allow $1_t self:capability { chown dac_override fsetid setuid setgid sys_resource }; # Access terminals. allow $1_t { ttyfile ptyfile }:chr_file rw_file_perms;
domains/program/unused/amanda.te +0 -1
@@ -33,7 +33,6 @@ type amanda_t, domain, privlog; role system_r types amanda_t; -type amandaidx_port_t, port_type; # type for the amanda executables type amanda_exec_t, file_type, sysadmfile, exec_type;
domains/program/unused/comsat.te +6 -3
@@ -11,7 +11,10 @@ # comsat_exec_t is the type of the comsat executable. # -type comsat_port_t, port_type; -inetd_child_domain(comsat, udp) -allow comsat_t initrc_var_run_t:file { read lock }; +inetd_child_domain(comsat,udp) +allow comsat_t initrc_var_run_t:file r_file_perms; dontaudit comsat_t initrc_var_run_t:file write; +allow comsat_t mail_spool_t:dir r_dir_perms; +allow comsat_t mail_spool_t:lnk_file { read }; +allow comsat_t var_spool_t:dir { search }; +dontaudit comsat_t sysadm_tty_device_t:chr_file { getattr };
domains/program/unused/cups.te +1 -0
@@ -45,6 +45,7 @@ ') ifdef(`inetd.te', ` +allow inetd_t printer_port_t:tcp_socket { name_bind }; domain_auto_trans(inetd_t, cupsd_exec_t, cupsd_t) ')
domains/program/unused/dbskkd.te +0 -1
@@ -10,5 +10,4 @@ # 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 +0 -1
@@ -61,4 +61,3 @@ allow hald_t usbfs_t:file { getattr read }; 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/inetd.te +1 -13
@@ -12,13 +12,11 @@ # type telnet_port_t, port_type; type biff_port_t, port_type; -type amidxtape_port_t, port_type; ################################# # # Rules for the inetd_t domain. # -type inetd_port_t, port_type; daemon_domain(inetd, `, nscd_client_domain ifdef(`unlimitedInetd', `,admin, etc_writer, fs_domain, auth_write, privmem')' )
@@ -50,26 +48,16 @@ ifdef(`ftpd.te', `allow inetd_t ftp_port_t:tcp_socket name_bind;') ifdef(`rlogind.te', `allow inetd_t rlogin_port_t:tcp_socket name_bind;') ifdef(`rshd.te', `allow inetd_t rsh_port_t:tcp_socket name_bind;') -ifdef(`amanda.te', `allow inetd_t amanda_port_t:tcp_socket name_bind;') -ifdef(`swat.te', `allow inetd_t swat_port_t:tcp_socket name_bind;') -ifdef(`amanda.te', ` -allow inetd_t biff_port_t:tcp_socket name_bind; -allow inetd_t biff_port_t:udp_socket name_bind; -allow inetd_t amidxtape_port_t:tcp_socket name_bind; -') ifdef(`talk.te', ` allow inetd_t talk_port_t:tcp_socket name_bind; allow inetd_t ntalk_port_t:tcp_socket name_bind; ') -# allow to bind to chargen, echo, etc -allow inetd_t inetd_port_t:{ tcp_socket udp_socket } name_bind; - # Communicate with the portmapper. ifdef(`portmap.te', `can_udp_send(inetd_t, portmap_t)') -inetd_child_domain(inetd_child) +inetd_child_domain(inetd_child,udp) ifdef(`unconfined.te', ` domain_auto_trans(inetd_t, unconfined_exec_t, unconfined_t)
domains/program/unused/ktalkd.te +1 -3
@@ -10,6 +10,4 @@ # ktalkd_exec_t is the type of the ktalkd executable. # -type ktalkd_port_t, port_type; -inetd_child_domain(ktalkd, udp) -allow inetd_t ktalkd_port_t:udp_socket name_bind; +inetd_child_domain(ktalkd,udp)
domains/program/unused/rhgb.te +7 -2
@@ -29,7 +29,7 @@ # for ramfs file systems allow rhgb_t ramfs_t:dir { setattr rw_dir_perms }; allow rhgb_t ramfs_t:sock_file create_file_perms; -allow rhgb_t ramfs_t:file unlink; +allow rhgb_t ramfs_t:{ file fifo_file } create_file_perms; allow insmod_t ramfs_t:file write; allow insmod_t rhgb_t:fd use;
@@ -84,4 +84,9 @@ ifdef(`firstboot.te', ` allow rhgb_t firstboot_rw_t:file r_file_perms; ') - +dontaudit rhgb_t tmp_t:dir { search }; +allow rhgb_t xdm_xserver_t:process { sigkill }; +allow domain rhgb_devpts_t:chr_file { read write }; +ifdef(`fsadm.te', ` +dontaudit fsadm_t ramfs_t:fifo_file { write }; +')
domains/program/unused/rsync.te +0 -1
@@ -10,5 +10,4 @@ # rsync_exec_t is the type of the rsync executable. # -type rsync_port_t, port_type; inetd_child_domain(rsync)
domains/program/unused/sendmail.te +2 -4
@@ -65,10 +65,8 @@ # Read /usr/lib/sasl2/.* allow sendmail_t lib_t:file { getattr read }; -# /usr/sbin/sendmail asks for w access to utmp, but it will operate -# correctly without it. Do not audit write and lock denials to utmp. -allow sendmail_t initrc_var_run_t:file { getattr read }; -dontaudit sendmail_t initrc_var_run_t:file { lock write }; +# /usr/sbin/sendmail asks for w access to utmp +allow sendmail_t initrc_var_run_t:file { getattr read lock write }; # When sendmail runs as user_mail_domain, it needs some extra permissions # to update /etc/mail/statistics.
domains/program/unused/slrnpull.te +2 -0
@@ -19,3 +19,5 @@ ') system_crond_entry(slrnpull_exec_t, slrnpull_t) allow userdomain slrnpull_spool_t:dir { search }; +rw_dir_create_file(slrnpull_t, slrnpull_spool_t) +allow slrnpull_t var_spool_t:dir { search };
domains/program/unused/snmpd.te +3 -0
@@ -24,6 +24,7 @@ # for the .index file var_lib_domain(snmpd) +file_type_auto_trans(snmpd_t, { var_t }, snmpd_var_lib_t, dir) file_type_auto_trans(snmpd_t, { usr_t var_t }, snmpd_var_lib_t, file) typealias snmpd_var_lib_t alias snmpd_var_rw_t;
@@ -70,3 +71,5 @@ allow snmpd_t var_lib_nfs_t:dir search; dontaudit snmpd_t domain:dir { getattr search }; + +dontaudit snmpd_t selinux_config_t:dir { search };
domains/program/unused/swat.te +0 -1
@@ -10,5 +10,4 @@ # swat_exec_t is the type of the swat executable. # -type swat_port_t, port_type; inetd_child_domain(swat)
domains/program/unused/tvtime.te +12 -0
@@ -0,0 +1,12 @@ +#DESC tvtime - a high quality television application +# +# Domains for the tvtime program. +# Author : Dan Walsh <[email protected]> +# +# tvtime_exec_t is the type of the tvtime executable. +# +type tvtime_exec_t, file_type, sysadmfile, exec_type; +type tvtime_dir_t, file_type, sysadmfile, pidfile; + +# Everything else is in the tvtime_domain macro in +# macros/program/tvtime_macros.te.
domains/program/unused/udev.te +1 -0
@@ -107,3 +107,4 @@ 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; +dontaudit udev_t domain:dir r_dir_perms;
domains/program/unused/vpnc.te +30 -0
@@ -0,0 +1,30 @@ +#DESC vpnc +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the vpnc_t domain, et al. +# +# vpnc_t is the domain for the vpnc program. +# vpnc_exec_t is the type of the vpnc executable. +# +daemon_domain(vpnc) + +allow vpnc_t { random_device_t urandom_device_t }:chr_file read; + +# Use the network. +can_network(vpnc_t) +can_ypbind(vpnc_t) + +# Use capabilities. +allow vpnc_t self:capability { net_admin ipc_lock net_bind_service net_raw }; + +allow vpnc_t devpts_t:dir search; +allow vpnc_t etc_t:file { getattr read }; +allow vpnc_t tun_tap_device_t:chr_file { ioctl read write }; +allow vpnc_t vpnc_t:rawip_socket create_socket_perms; +allow vpnc_t vpnc_t:unix_dgram_socket create_socket_perms; +allow vpnc_t vpnc_t:unix_stream_socket create_socket_perms; +allow vpnc_t admin_tty_type:chr_file rw_file_perms;
domains/program/unused/xdm.te +1 -0
@@ -215,6 +215,7 @@ dontaudit xdm_t misc_device_t:file_class_set rw_file_perms; dontaudit xdm_t removable_device_t:file_class_set rw_file_perms; dontaudit xdm_t scsi_generic_device_t:file_class_set rw_file_perms; +dontaudit xdm_t devpts_t:dir { search }; # Do not audit denied probes of /proc. dontaudit xdm_t domain:dir r_dir_perms;
file_contexts/program/passwd.fc +1 -0
@@ -1,5 +1,6 @@ # spasswd /usr/bin/passwd -- system_u:object_r:passwd_exec_t +/usr/bin/chage -- system_u:object_r:passwd_exec_t /usr/bin/chsh -- system_u:object_r:chfn_exec_t /usr/bin/chfn -- system_u:object_r:chfn_exec_t /usr/sbin/vipw -- system_u:object_r:admin_passwd_exec_t
file_contexts/program/tvtime.fc +3 -0
@@ -0,0 +1,3 @@ +# tvtime +/usr/bin/tvtime -- system_u:object_r:tvtime_exec_t +
file_contexts/program/vpnc.fc +2 -0
@@ -0,0 +1,2 @@ +# vpnc +/usr/sbin/vpnc -- system_u:object_r:vpnc_exec_t
macros/base_user_macros.te +2 -0
@@ -152,6 +152,7 @@ ifdef(`crontab.te', `crontab_domain($1)') ifdef(`screen.te', `screen_domain($1)') +ifdef(`tvtime.te', `tvtime_domain($1)') ifdef(`mozilla.te', `mozilla_domain($1)') ifdef(`use_games', `ifdef(`games.te', `games_domain($1)')') ifdef(`gpg.te', `gpg_domain($1)')
@@ -287,6 +288,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/global_macros.te +1 -0
@@ -287,6 +287,7 @@ allow $1_t device_t:dir { getattr search }; allow $1_t null_device_t:chr_file rw_file_perms; dontaudit $1_t console_device_t:chr_file rw_file_perms; +dontaudit $1_t unpriv_userdomain:fd use; r_dir_file($1_t, sysfs_t)
macros/program/inetd_macros.te +5 -0
@@ -52,4 +52,9 @@ allow $1_t krb5_conf_t:file r_file_perms; dontaudit $1_t krb5_conf_t:file write; allow $1_t urandom_device_t:chr_file { getattr read }; +type $1_port_t, port_type; +allow inetd_t $1_port_t:tcp_socket { name_bind }; +ifelse($2, udp, ` +allow inetd_t $1_port_t:udp_socket { name_bind }; +') ')
macros/program/mozilla_macros.te +5 -0
@@ -69,8 +69,12 @@ domain_auto_trans($1_mozilla_t, lpr_exec_t, $1_lpr_t) # $1_lpr_t should only need read access to the tmp files allow $1_lpr_t $1_mozilla_rw_t:file rw_file_perms; +dontaudit $1_lpr_t $1_mozilla_t:tcp_socket { read write }; +dontaudit $1_lpr_t $1_mozilla_t:unix_stream_socket { read write }; ') +dontaudit $1_mozilla_t tmp_t:lnk_file read; + # # This is another place where I sould like to allow system customization. # We need to allow the admin to select whether then want to allow mozilla
@@ -107,6 +111,7 @@ 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 }; +dontaudit $1_mozilla_t tmpfile:file getattr; ifdef(`xdm.te', ` allow $1_mozilla_t xdm_t:fifo_file { write read };
macros/program/sendmail_macros.te +1 -1
@@ -44,7 +44,7 @@ ifelse(`$1', `sysadm', ` allow $1_mail_t proc_t:dir { getattr search }; -allow $1_mail_t proc_t:file { getattr read }; +allow $1_mail_t proc_t:{ lnk_file file } { getattr read }; allow $1_mail_t sysctl_kernel_t:file { getattr read }; allow $1_mail_t etc_runtime_t:file { getattr read }; ', `
macros/program/tvtime_macros.te +45 -0
45 lines not on this page · raw message
macros/program/xserver_macros.te +3 -0
@@ -198,7 +198,10 @@ # Create and access /dev/dri devices. allow $1_xserver_t device_t:dir create; +allow $1_xserver_t device_t:dir { setattr }; file_type_auto_trans($1_xserver_t, device_t, dri_device_t, chr_file) +# brought on by rhgb +allow $1_xserver_t mnt_t:dir { search }; allow $1_xserver_t tty_device_t:chr_file { setattr rw_file_perms };
Makefile +5 -1
@@ -52,7 +52,7 @@ FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) $(wildcard file_contexts/misc/*.fc) APPDIR=$(CONTEXTPATH) -APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context) $(CONTEXTPATH)/files/media +APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context) $(CONTEXTPATH)/files/media ROOTFILES = $(addprefix $(APPDIR)/users/,root)
@@ -68,6 +68,10 @@ mkdir -p $(APPDIR) install -m 644 $< $@ +$(APPDIR)/removable_context: appconfig/removable_context + mkdir -p $(APPDIR) + install -m 644 $< $@ + $(APPDIR)/default_type: appconfig/default_type mkdir -p $(APPDIR) install -m 644 $< $@
net_contexts +40 -21
100 lines not on this page · raw message
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 -10
@@ -1,42 +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') +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 3 lines · Daniel J Walsh
Cleaned up patch with some of russells changes.
chage has been updated to do a
checkPasswdAccess(PASSWD__ROOTOK)now.
+allow getty_t initrc_devpts_t:chr_file { read write };
What is this for?
-# /usr/sbin/sendmail asks for w access to utmp, but it will operate -# correctly without it. Do not audit write and lock denials to utmp. -allow sendmail_t initrc_var_run_t:file { getattr read }; -dontaudit sendmail_t initrc_var_run_t:file { lock write }; +# /usr/sbin/sendmail asks for w access to utmp
+allow sendmail_t initrc_var_run_t:file { getattr read lock write };
You missed my fix for this problem.
allow $1_xserver_t device_t:dir create;
+allow $1_xserver_t device_t:dir { setattr };
Probably best to just merge the above two lines with { create setattr }.
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.
Quoted 5 lines · Russell Coker
Quoted 2 lines · Daniel J Walsh
Cleaned up patch with some of russells changes.
Quoted 10 lines
Quoted 3 lines
chage has been updated to do a
checkPasswdAccess(PASSWD__ROOTOK)now.+allow
getty_tinitrc_devpts_t:chr_file { read write };What is this for?
I have been getting AVC messages for it.
Quoted 10 lines
domains/program/unused/sendmail.te +2
-4-# /usr/sbin/sendmail asks for w access to utmp, but it will operate -# correctly without it. Do not audit write and lock denials to utmp. -allow sendmail_t initrc_var_run_t:file { getattr read }; -dontaudit sendmail_t initrc_var_run_t:file { lock write }; +# /usr/sbin/sendmail asks for w access to utmp +allow sendmail_t initrc_var_run_t:file { getattr read lock write };You missed my fix for this problem.
No I know about it but Need to wait for sendmail to be fixed to revert this change.
Quoted 7 lines
allow $1_xserver_t device_t:dir create;
+allow $1_xserver_t device_t:dir { setattr };Probably best to just merge the above two lines with { create setattr }.
Sounds good.
--
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 11 lines · Daniel J Walsh
Quoted 8 lines · Russell Coker
Quoted 3 lines · Daniel J Walsh
Cleaned up patch with some of russells changes.
chage has been updated to do a
checkPasswdAccess(PASSWD__ROOTOK)now.+allow
getty_tinitrc_devpts_t:chr_file { read write };What is this for?
I have been getting AVC messages for it.
Please show me the AVC messages.
Quoted 11 lines
Quoted 8 lines
domains/program/unused/sendmail.te +2
-4-# /usr/sbin/sendmail asks for w access to utmp, but it will operate -# correctly without it. Do not audit write and lock denials to utmp. -allow sendmail_t initrc_var_run_t:file { getattr read }; -dontaudit sendmail_t initrc_var_run_t:file { lock write }; +# /usr/sbin/sendmail asks for w access to utmp +allow sendmail_t initrc_var_run_t:file { getattr read lock write };You missed my fix for this problem.
No I know about it but Need to wait for sendmail to be fixed to revert this change.
The patch I sent needs no changes to sendmail. Please apply it.
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.
Quoted 16 lines · Russell Coker
Quoted 13 lines · Daniel J Walsh
Quoted 10 lines · Russell Coker
Quoted 5 lines · Daniel J Walsh
Cleaned up patch with some of russells changes.
chage has been updated to do a
checkPasswdAccess(PASSWD__ROOTOK)now.+allow
getty_tinitrc_devpts_t:chr_file { read write };
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
What is this for?
I have been getting AVC messages for it.
Please show me the AVC messages.
Oct 6 07:31:21 dhcppc0 kernel: audit(1097062281.872:0): avc: denied { read write } for pid=3884 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062281.909:0): avc: denied { read write } for pid=3885 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062281.910:0): avc: denied { read write } for pid=3885 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062281.910:0): avc: denied { read write } for pid=3885 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.034:0): avc: denied { read write } for pid=3930 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.157:0): avc: denied { read write } for pid=3975 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.157:0): avc: denied { read write } for pid=3975 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.158:0): avc: denied { read write } for pid=3975 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.279:0): avc: denied { read write } for pid=4020 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.280:0): avc: denied { read write } for pid=4020 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.280:0): avc: denied { read write } for pid=4020 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_file
Oct 6 07:31:22 dhcppc0 kernel: audit(1097062282.580:0): avc: denied { read write } for pid=4065 exe=/sbin/mingetty path=/dev/pts/0 dev=devpts ino=2 scontext=system_u:system_r:getty_t tcontext=system_u:object_r:initrc_devpts_t tclass=chr_fileQuoted 8 lines · Daniel J Walsh
Quoted 7 lines · Russell Coker
Quoted 6 lines · Daniel J Walsh
Quoted 5 lines · Russell Coker
Quoted 3 lines · Daniel J Walsh
Cleaned up patch with some of russells changes.
chage has been updated to do a
checkPasswdAccess(PASSWD__ROOTOK)now.
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
+allow
getty_tinitrc_devpts_t:chr_file { read write };What is this for?
I have been getting AVC messages for it.
Please show me the AVC messages.
That's strange. How do you reproduce this?
initrc_devpts_t can only be created by initrc_t, and getty_t can only be entered from init_t. Somehow getty or init must be trying to open /dev/pts/0 for some reason.
Something must have a bug, it would be good if we could track it down.
In the mean time if this entry is to be included in the policy it should have ifdef(distro_redhat' or ifdef(hide_broken_symptoms' around it.
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.
+dontaudit $1_mozilla_t tmp_t:lnk_file read;
This should not be possible. If tmp_t:lnk_file gets generated with strict policy then we have a bug somewhere else.
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.
Quoted 6 lines · Russell Coker
+dontaudit $1_mozilla_t tmp_t:lnk_file read;
This should not be possible. If tmp_t:lnk_file gets generated with strict policy then we have a bug somewhere else.
Something seems to generate it regularly, probably when setenforce 0 in effect. Have had to do this alot because of broken kernel(s).
--
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 9 lines · Daniel J Walsh
Quoted 4 lines · Russell Coker
+dontaudit $1_mozilla_t tmp_t:lnk_file read;
This should not be possible. If tmp_t:lnk_file gets generated with strict policy then we have a bug somewhere else.
Something seems to generate it regularly, probably when setenforce 0 in effect. Have had to
do this alot because of broken kernel(s).
What is the name of the lnk_file in question?
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.
Merged the start_udev line and the kudzu patch.
Quoted 18 lines · Russell Coker
Quoted 10 lines · James Carter
Mostly merged with the corrections.
These two lines caused things to break, so I held off merging these for now.
(quoted diff) +2
-0+/sbin/kmodule -- system_u:object_r:kudzu_exec_t +/sbin/start_udev -- system_u:object_r:udev_exec_tThese are the denials I am seeing:
avc: denied { unlink } for pid=705 exe=/bin/rm name=.udev.tdb dev=tmpfs ino=927 scontext=system_u:system_r:udev_tVersion 7.85-1 of the initscripts package fixes the restorecon command to use the -R option to label all of /dev. If you upgrade to the latest rawhide then the
start_udevlabelling should work. NB I sent the patch to you before rawhide was fixed, this was intentional as neither patch worked well without the other so there was no benefit in delaying.
Quoted 8 lines
Quoted 3 lines
avc: denied { search } for pid=856 exe=/sbin/kmodule name=usr dev=hda2 ino=162881 scontext=system_u:system_r:kudzu_t tcontext=user_u:object_r:file_t tclass=dir
Looks like either mis-labelling or you have /usr on a different file system. I guess we have to add a dontaudit rule for that for when /usr (or /var or whatever else it may access that isn't on the root fs).
I do have /usr on a different file system.
Quoted 26 lines
Quoted 4 lines
avc: denied { getattr } for
pid=856 exe=/sbin/kmodule path=/lib/modules/2.6.8-1.541/kernel dev=hda2 ino=930725 scontext=system_u:system_r:kudzu_t tcontext=system_u:object_r:modules_object_t tclass=dirI've attached kudzu.diff to deal with this issue and the above. Please try including those file contexts changes, with kudzu.diff and the latest initscripts it should be fine.
Quoted 4 lines
avc: denied {
setattr } for pid=2402 exe=/usr/X11R6/bin/Xorg name=dri dev=tmpfs ino=7757 scontext=system_u:system_r:xdm_xserver_t tcontext=system_u:object_r:device_t tclass=dirI think that Dan's latest patch allowed that one.
Quoted 4 lines
The
xdm_xserver_tdevice_t:dir setattr denial is not due to this patch. It is the only denial that I have been seeing lately; I just haven't had an opportunity to look into it more. It doesn't appear to cause any problems though.Long term udev has to deal with that too. The X server should not be creating device nodes. Quite a bit of work has recently gone into reducing
/dev/memaccess but allowing arbitrary device node creation wastes that. It'll be fixed eventually (but at the moment we are already busy enough with udev issues).
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.
Submitting patches against latest policy again.
Dan
domains/program/passwd.te +1 -1
@@ -42,7 +42,7 @@ allow $1_t etc_t:lnk_file read; # Use capabilities. -allow $1_t self:capability { chown dac_override fsetid setuid sys_resource }; +allow $1_t self:capability { chown dac_override fsetid setuid setgid sys_resource }; # Access terminals. allow $1_t { ttyfile ptyfile }:chr_file rw_file_perms;
domains/program/unused/amanda.te +0 -1
@@ -33,7 +33,6 @@ type amanda_t, domain, privlog; role system_r types amanda_t; -type amandaidx_port_t, port_type; # type for the amanda executables type amanda_exec_t, file_type, sysadmfile, exec_type;
domains/program/unused/comsat.te +6 -3
@@ -11,7 +11,10 @@ # comsat_exec_t is the type of the comsat executable. # -type comsat_port_t, port_type; -inetd_child_domain(comsat, udp) -allow comsat_t initrc_var_run_t:file { read lock }; +inetd_child_domain(comsat,udp) +allow comsat_t initrc_var_run_t:file r_file_perms; dontaudit comsat_t initrc_var_run_t:file write; +allow comsat_t mail_spool_t:dir r_dir_perms; +allow comsat_t mail_spool_t:lnk_file { read }; +allow comsat_t var_spool_t:dir { search }; +dontaudit comsat_t sysadm_tty_device_t:chr_file { getattr };
domains/program/unused/cups.te +1 -0
@@ -45,6 +45,7 @@ ') ifdef(`inetd.te', ` +allow inetd_t printer_port_t:tcp_socket { name_bind }; domain_auto_trans(inetd_t, cupsd_exec_t, cupsd_t) ')
domains/program/unused/dbskkd.te +0 -1
@@ -10,5 +10,4 @@ # 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 +0 -1
@@ -61,4 +61,3 @@ allow hald_t usbfs_t:file { getattr read }; 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/inetd.te +0 -12
@@ -12,13 +12,11 @@ # type telnet_port_t, port_type; type biff_port_t, port_type; -type amidxtape_port_t, port_type; ################################# # # Rules for the inetd_t domain. # -type inetd_port_t, port_type; daemon_domain(inetd, `, nscd_client_domain ifdef(`unlimitedInetd', `,admin, etc_writer, fs_domain, auth_write, privmem')' )
@@ -50,21 +48,11 @@ ifdef(`ftpd.te', `allow inetd_t ftp_port_t:tcp_socket name_bind;') ifdef(`rlogind.te', `allow inetd_t rlogin_port_t:tcp_socket name_bind;') ifdef(`rshd.te', `allow inetd_t rsh_port_t:tcp_socket name_bind;') -ifdef(`amanda.te', `allow inetd_t amanda_port_t:tcp_socket name_bind;') -ifdef(`swat.te', `allow inetd_t swat_port_t:tcp_socket name_bind;') -ifdef(`amanda.te', ` -allow inetd_t biff_port_t:tcp_socket name_bind; -allow inetd_t biff_port_t:udp_socket name_bind; -allow inetd_t amidxtape_port_t:tcp_socket name_bind; -') ifdef(`talk.te', ` allow inetd_t talk_port_t:tcp_socket name_bind; allow inetd_t ntalk_port_t:tcp_socket name_bind; ') -# allow to bind to chargen, echo, etc -allow inetd_t inetd_port_t:{ tcp_socket udp_socket } name_bind; - # Communicate with the portmapper. ifdef(`portmap.te', `can_udp_send(inetd_t, portmap_t)')
domains/program/unused/ktalkd.te +1 -3
@@ -10,6 +10,4 @@ # ktalkd_exec_t is the type of the ktalkd executable. # -type ktalkd_port_t, port_type; -inetd_child_domain(ktalkd, udp) -allow inetd_t ktalkd_port_t:udp_socket name_bind; +inetd_child_domain(ktalkd,udp)
domains/program/unused/rhgb.te +7 -2
@@ -29,7 +29,7 @@ # for ramfs file systems allow rhgb_t ramfs_t:dir { setattr rw_dir_perms }; allow rhgb_t ramfs_t:sock_file create_file_perms; -allow rhgb_t ramfs_t:file unlink; +allow rhgb_t ramfs_t:{ file fifo_file } create_file_perms; allow insmod_t ramfs_t:file write; allow insmod_t rhgb_t:fd use;
@@ -84,4 +84,9 @@ ifdef(`firstboot.te', ` allow rhgb_t firstboot_rw_t:file r_file_perms; ') - +dontaudit rhgb_t tmp_t:dir { search }; +allow rhgb_t xdm_xserver_t:process { sigkill }; +allow domain rhgb_devpts_t:chr_file { read write }; +ifdef(`fsadm.te', ` +dontaudit fsadm_t ramfs_t:fifo_file { write }; +')
domains/program/unused/rpm.te +2 -2
@@ -152,7 +152,7 @@ can_exec_any(rpm_script_t) # Capabilties needed by rpm scripts utils -allow rpm_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot mknod }; +allow rpm_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot sys_nice mknod }; # ideally we would not need this allow rpm_script_t { file_type - shadow_t }:dir create_dir_perms;
@@ -172,7 +172,7 @@ allow crond_t rpm_t:fifo_file r_file_perms; ') -allow rpm_script_t proc_t:dir { search getattr }; +allow rpm_script_t proc_t:dir { search getattr read }; allow rpm_script_t proc_t:{ file lnk_file } r_file_perms; allow rpm_script_t devtty_t:chr_file rw_file_perms;
domains/program/unused/rsync.te +0 -1
@@ -10,5 +10,4 @@ # rsync_exec_t is the type of the rsync executable. # -type rsync_port_t, port_type; inetd_child_domain(rsync)
domains/program/unused/sendmail.te +0 -5
@@ -65,11 +65,6 @@ # Read /usr/lib/sasl2/.* allow sendmail_t lib_t:file { getattr read }; -# /usr/sbin/sendmail asks for w access to utmp, but it will operate -# correctly without it. Do not audit write and lock denials to utmp. -allow sendmail_t initrc_var_run_t:file { getattr read }; -dontaudit sendmail_t initrc_var_run_t:file { lock write }; - # When sendmail runs as user_mail_domain, it needs some extra permissions # to update /etc/mail/statistics. allow user_mail_domain etc_mail_t:file rw_file_perms;
domains/program/unused/slrnpull.te +2 -0
@@ -19,3 +19,5 @@ ') system_crond_entry(slrnpull_exec_t, slrnpull_t) allow userdomain slrnpull_spool_t:dir { search }; +rw_dir_create_file(slrnpull_t, slrnpull_spool_t) +allow slrnpull_t var_spool_t:dir { search };
domains/program/unused/snmpd.te +3 -0
@@ -24,6 +24,7 @@ # for the .index file var_lib_domain(snmpd) +file_type_auto_trans(snmpd_t, { var_t }, snmpd_var_lib_t, dir) file_type_auto_trans(snmpd_t, { usr_t var_t }, snmpd_var_lib_t, file) typealias snmpd_var_lib_t alias snmpd_var_rw_t;
@@ -70,3 +71,5 @@ allow snmpd_t var_lib_nfs_t:dir search; dontaudit snmpd_t domain:dir { getattr search }; + +dontaudit snmpd_t selinux_config_t:dir { search };
domains/program/unused/swat.te +0 -1
@@ -10,5 +10,4 @@ # swat_exec_t is the type of the swat executable. # -type swat_port_t, port_type; inetd_child_domain(swat)
domains/program/unused/tvtime.te +12 -0
@@ -0,0 +1,12 @@ +#DESC tvtime - a high quality television application +# +# Domains for the tvtime program. +# Author : Dan Walsh <[email protected]> +# +# tvtime_exec_t is the type of the tvtime executable. +# +type tvtime_exec_t, file_type, sysadmfile, exec_type; +type tvtime_dir_t, file_type, sysadmfile, pidfile; + +# Everything else is in the tvtime_domain macro in +# macros/program/tvtime_macros.te.
domains/program/unused/udev.te +1 -0
@@ -107,3 +107,4 @@ 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; +dontaudit udev_t domain:dir r_dir_perms;
domains/program/unused/vpnc.te +30 -0
@@ -0,0 +1,30 @@ +#DESC vpnc +# +# Author: Dan Walsh <[email protected]> +# + +################################# +# +# Rules for the vpnc_t domain, et al. +# +# vpnc_t is the domain for the vpnc program. +# vpnc_exec_t is the type of the vpnc executable. +# +daemon_domain(vpnc) + +allow vpnc_t { random_device_t urandom_device_t }:chr_file read; + +# Use the network. +can_network(vpnc_t) +can_ypbind(vpnc_t) + +# Use capabilities. +allow vpnc_t self:capability { net_admin ipc_lock net_bind_service net_raw }; + +allow vpnc_t devpts_t:dir search; +allow vpnc_t etc_t:file { getattr read }; +allow vpnc_t tun_tap_device_t:chr_file { ioctl read write }; +allow vpnc_t vpnc_t:rawip_socket create_socket_perms; +allow vpnc_t vpnc_t:unix_dgram_socket create_socket_perms; +allow vpnc_t vpnc_t:unix_stream_socket create_socket_perms; +allow vpnc_t admin_tty_type:chr_file rw_file_perms;
domains/program/unused/xdm.te +1 -0
@@ -215,6 +215,7 @@ dontaudit xdm_t misc_device_t:file_class_set rw_file_perms; dontaudit xdm_t removable_device_t:file_class_set rw_file_perms; dontaudit xdm_t scsi_generic_device_t:file_class_set rw_file_perms; +dontaudit xdm_t devpts_t:dir { search }; # Do not audit denied probes of /proc. dontaudit xdm_t domain:dir r_dir_perms;
file_contexts/program/mozilla.fc +1 -0
@@ -5,6 +5,7 @@ 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 +HOME_DIR/My Downloads(/.*)? 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
file_contexts/program/passwd.fc +1 -0
@@ -1,5 +1,6 @@ # spasswd /usr/bin/passwd -- system_u:object_r:passwd_exec_t +/usr/bin/chage -- system_u:object_r:passwd_exec_t /usr/bin/chsh -- system_u:object_r:chfn_exec_t /usr/bin/chfn -- system_u:object_r:chfn_exec_t /usr/sbin/vipw -- system_u:object_r:admin_passwd_exec_t
file_contexts/program/sendmail.fc +2 -0
@@ -3,3 +3,5 @@ /var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t /var/log/sendmail\.st -- system_u:object_r:sendmail_log_t /var/log/mail(/.*)? system_u:object_r:sendmail_log_t +/var/run/sendmail.pid -- system_u:object_r:sendmail_var_run_t +/var/run/sm-client.pid -- system_u:object_r:sendmail_var_run_t
file_contexts/program/tvtime.fc +3 -0
@@ -0,0 +1,3 @@ +# tvtime +/usr/bin/tvtime -- system_u:object_r:tvtime_exec_t +
file_contexts/program/vpnc.fc +2 -0
@@ -0,0 +1,2 @@ +# vpnc +/usr/sbin/vpnc -- system_u:object_r:vpnc_exec_t
macros/base_user_macros.te +2 -0
@@ -152,6 +152,7 @@ ifdef(`crontab.te', `crontab_domain($1)') ifdef(`screen.te', `screen_domain($1)') +ifdef(`tvtime.te', `tvtime_domain($1)') ifdef(`mozilla.te', `mozilla_domain($1)') ifdef(`use_games', `ifdef(`games.te', `games_domain($1)')') ifdef(`gpg.te', `gpg_domain($1)')
@@ -287,6 +288,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/global_macros.te +1 -0
@@ -287,6 +287,7 @@ allow $1_t device_t:dir { getattr search }; allow $1_t null_device_t:chr_file rw_file_perms; dontaudit $1_t console_device_t:chr_file rw_file_perms; +dontaudit $1_t unpriv_userdomain:fd use; r_dir_file($1_t, sysfs_t)
macros/program/inetd_macros.te +16 -6
@@ -37,12 +37,6 @@ allow $1_t var_t:dir search; var_run_domain($1) -# Use sockets inherited from inetd. -ifelse($2, udp, ` -allow $1_t inetd_t:udp_socket rw_socket_perms; -', ` -allow $1_t inetd_t:tcp_socket rw_stream_socket_perms; -') # for identd allow $1_t self:netlink_tcpdiag_socket r_netlink_socket_perms; allow $1_t self:capability { setuid setgid };
@@ -52,4 +46,20 @@ allow $1_t krb5_conf_t:file r_file_perms; dontaudit $1_t krb5_conf_t:file write; allow $1_t urandom_device_t:chr_file { getattr read }; +type $1_port_t, port_type; +# Use sockets inherited from inetd. +ifelse($2, `', ` +allow inetd_t $1_port_t:udp_socket { name_bind }; +allow $1_t inetd_t:udp_socket rw_socket_perms; +allow inetd_t $1_port_t:tcp_socket { name_bind }; +allow $1_t inetd_t:tcp_socket rw_stream_socket_perms; +') +ifelse($2, tcp, ` +allow inetd_t $1_port_t:tcp_socket { name_bind }; +allow $1_t inetd_t:tcp_socket rw_stream_socket_perms; +') +ifelse($2, udp, ` +allow inetd_t $1_port_t:udp_socket { name_bind }; +allow $1_t inetd_t:udp_socket rw_socket_perms; +') ')
macros/program/mozilla_macros.te +5 -0
@@ -69,8 +69,12 @@ domain_auto_trans($1_mozilla_t, lpr_exec_t, $1_lpr_t) # $1_lpr_t should only need read access to the tmp files allow $1_lpr_t $1_mozilla_rw_t:file rw_file_perms; +dontaudit $1_lpr_t $1_mozilla_t:tcp_socket { read write }; +dontaudit $1_lpr_t $1_mozilla_t:unix_stream_socket { read write }; ') +dontaudit $1_mozilla_t tmp_t:lnk_file read; + # # This is another place where I sould like to allow system customization. # We need to allow the admin to select whether then want to allow mozilla
@@ -107,6 +111,7 @@ 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 }; +dontaudit $1_mozilla_t tmpfile:file getattr; ifdef(`xdm.te', ` allow $1_mozilla_t xdm_t:fifo_file { write read };
macros/program/sendmail_macros.te +1 -1
@@ -44,7 +44,7 @@ ifelse(`$1', `sysadm', ` allow $1_mail_t proc_t:dir { getattr search }; -allow $1_mail_t proc_t:file { getattr read }; +allow $1_mail_t proc_t:{ lnk_file file } { getattr read }; allow $1_mail_t sysctl_kernel_t:file { getattr read }; allow $1_mail_t etc_runtime_t:file { getattr read }; ', `
macros/program/tvtime_macros.te +45 -0
45 lines not on this page · raw message
macros/program/xserver_macros.te +3 -0
@@ -198,7 +198,10 @@ # Create and access /dev/dri devices. allow $1_xserver_t device_t:dir create; +allow $1_xserver_t device_t:dir { setattr }; file_type_auto_trans($1_xserver_t, device_t, dri_device_t, chr_file) +# brought on by rhgb +allow $1_xserver_t mnt_t:dir { search }; allow $1_xserver_t tty_device_t:chr_file { setattr rw_file_perms };
Makefile +5 -1
@@ -52,7 +52,7 @@ FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) $(wildcard file_contexts/misc/*.fc) APPDIR=$(CONTEXTPATH) -APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context) $(CONTEXTPATH)/files/media +APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context) $(CONTEXTPATH)/files/media ROOTFILES = $(addprefix $(APPDIR)/users/,root)
@@ -68,6 +68,10 @@ mkdir -p $(APPDIR) install -m 644 $< $@ +$(APPDIR)/removable_context: appconfig/removable_context + mkdir -p $(APPDIR) + install -m 644 $< $@ + $(APPDIR)/default_type: appconfig/default_type mkdir -p $(APPDIR) install -m 644 $< $@
net_contexts +40 -21
100 lines not on this page · raw message
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 -10
@@ -1,42 +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') +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 10 lines · Daniel J Walsh
Submitting patches against latest policy again.
Dan
______________________________________________________________________
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/mozilla.fc policy-1.17.27/file_contexts/program/mozilla.fc
file_contexts/program/mozilla.fc line 11
Quoted 7 lines
file_contexts/program/mozilla.fc +1
-0@@ -5,6 +5,7 @@ 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 +HOME_DIR/My Downloads(/.*)? 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
Shouldn't this have an ifdef(`windows') around it? :)
Is this going to be some sort of default download area for Mozilla? Is this Fedora specific?
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 31 lines · Daniel J Walsh
Quoted 29 lines · James Carter
Quoted 14 lines · Daniel J Walsh
Submitting patches against latest policy again.
Dan
______________________________________________________________________
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/mozilla.fc policy-1.17.27/file_contexts/program/mozilla.fc
file_contexts/program/mozilla.fc +0
-0@@ -5,6 +5,7 @@Quoted 9 lines
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
+HOME_DIR/MyDownloads(/.*)? 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_tShouldn't this have an ifdef(`windows') around it? :)
Quoted 6 lines
Quoted 5 lines
Is this going to be some sort of default download area for Mozilla? Is this Fedora specific?
Default download for Firefox.
This won't work with the space, I used this instead:
HOME_DIR/My.Downloads(/.*)? system_u:object_r:ROLE_mozilla_rw_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.
Merged.
There are some minor changes such as My.Downloads instead of My Downloads and not having {} around a single item.
Quoted 5 lines · Daniel J Walsh
Submitting patches against latest policy again.
Dan
______________________________________________________________________
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.
james, i didn't see a reply to your question about whether it was mozilla that defined the "~/My Downloads" directory:
did i miss something?
i appreciate the issues of needing, ultimately, some helper-program intervention which determines (saaay... by asking for the user's password) whether a file should be saved with a file context of user_mozilla_t or user_home_t.
and that there needs to be a sandbox area in which files should be saved.
... but does it _have_ to be in ~/My windows style downloads???
Quoted 5 lines · James Carter
Merged.
There are some minor changes such as My.Downloads instead of My Downloads and not having {} around a single item.
--
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.
Hi,
Quoted 5 lines
james, i didn't see a reply to your question about whether it was mozilla that defined the "~/My Downloads" directory:
did i miss something?... but does it _have_ to be in ~/My windows style downloads???
In the default configuration Epiphany saves to ~/Desktop/Downloads i think. IMHO Distributions should configure Mozilla to use this directory, too, by default.
When i first saw this i was a bit annoyed, that it didn't ask me where to save the downloads. But when i had my file managers open, i found it even easier to just move the downloaded files to their destinations than having the file selector pop up.
Greetings,
Erich Schubert
Signature · 11 lines
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
The best things in life are free: Friendship and Love. //\
Für jedes Problem gibt es eine Lösung, V_/_
die einfach, klar und falsch ist.
--
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.Dan replied to me that it was the default download place for Firefox.
Quoted 27 lines · Luke Kenneth Casson Leighton
james, i didn't see a reply to your question about whether it was mozilla that defined the "~/My Downloads" directory:
did i miss something?i appreciate the issues of needing, ultimately, some helper-program intervention which determines (saaay... by asking for the user's password) whether a file should be saved with a file context of
user_mozilla_toruser_home_t.and that there needs to be a sandbox area in which files should be saved.
... but does it _have_ to be in ~/My windows style downloads???
Quoted 5 lines · James Carter
Merged.
There are some minor changes such as My.Downloads instead of My Downloads and not having {} around a single item.
--
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.
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 9 lines · Luke Kenneth Casson Leighton
james, i didn't see a reply to your question about whether it was mozilla that defined the "~/My Downloads" directory:
did i miss something?i appreciate the issues of needing, ultimately, some helper-program intervention which determines (saaay... by asking for the user's password) whether a file should be saved with a file context of
user_mozilla_toruser_home_t.
Quoted 19 lines
and that there needs to be a sandbox area in which files should be saved.
... but does it _have_ to be in ~/My windows style downloads???
Quoted 7 lines · James Carter
Merged.
There are some minor changes such as My.Downloads instead of My Downloads and not having {} around a single item.
"My Downloads" is a default of firefox. Don't shoot the messenger.
http://www.mozilla.org/projects/firefox/ue/downloads/
Dan
--
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 3 lines · Daniel J Walsh
Quoted 1 line · Luke Kenneth Casson Leighton
"My Downloads" is a default of firefox. Don't shoot the messenger.
ah ha, that's the bit of info i was missing.
ta,
l.
Signature · 13 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 /> -- 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.