patch for new domains
I've attached a patch with policy for Perdition, nessus, nsd, and UML. Also it has a new file auth-net.te with the policy for doing network authentication (LDAP etc).
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/misc/auth-net.te renamed from tmp/policy/domains/misc/auth-net.te +4 -0
@@ -0,0 +1,4 @@ +#DESC Policy for using network servers for authenticating users (IE PAM-LDAP) + +can_network(auth) +allow auth resolv_conf_t:file { getattr read };
domains/program/nessusd.te renamed from tmp/policy/domains/program/nessusd.te +58 -0
58 lines not on this page · raw message
domains/program/nsd.te renamed from tmp/policy/domains/program/nsd.te +51 -0
51 lines not on this page · raw message
domains/program/perdition.te renamed from tmp/policy/domains/program/perdition.te +34 -0
@@ -0,0 +1,34 @@ +#DESC Perdition POP and IMAP proxy +# +# Author: Russell Coker <[email protected]> +# + +################################# +# +# Rules for the perdition_t domain. +# +daemon_domain(perdition) + +ifdef(`courier.te', `', ` +type pop_port_t, port_type; +') +allow perdition_t pop_port_t:tcp_socket name_bind; + +type etc_perdition_t, file_type, sysadmfile; + +# Use the network. +can_network(perdition_t) +allow perdition_t self:unix_stream_socket create_socket_perms; +allow perdition_t self:unix_dgram_socket create_socket_perms; + +# allow any domain to connect to the proxy +can_tcp_connect(domain, perdition_t) + +# Use capabilities +allow perdition_t self:capability { setgid setuid net_bind_service }; + +# read config files +allow perdition_t etc_perdition_t:dir r_dir_perms; +allow perdition_t { etc_t etc_perdition_t resolv_conf_t }:file r_file_perms; +allow perdition_t etc_t:lnk_file read; +
domains/program/uml.te renamed from tmp/policy/domains/program/uml.te +7 -0
@@ -0,0 +1,7 @@ + +# Author: Russell Coker <[email protected]> +# +type uml_exec_t, file_type, sysadmfile, exec_type; + +# the main code is in macros/program/uml_macros.te +
domains/program/uml_net.te renamed from tmp/policy/domains/program/uml_net.te +36 -0
@@ -0,0 +1,36 @@ +#DESC uml_net helper program for user-mode Linux +# +# Author: Russell Coker <[email protected]> +# + +type uml_net_t, domain, privlog; +type uml_net_exec_t, file_type, sysadmfile, exec_type; +in_user_role(uml_net_t) +allow uml_net_t self:process { fork signal_perms }; +allow uml_net_t { bin_t sbin_t }:dir search; +allow uml_net_t self:fifo_file { read write }; +allow uml_net_t device_t:dir search; +allow uml_net_t self:udp_socket { create ioctl }; +uses_shlib(uml_net_t) +allow uml_net_t devtty_t:chr_file { read write }; +allow uml_net_t etc_runtime_t:file { getattr read }; +allow uml_net_t etc_t:file read; +allow uml_net_t { proc_t sysctl_t sysctl_net_t }:dir search; +allow uml_net_t proc_t:file { getattr read }; + +# if you want ip_forward to be set then you should set it yourself +dontaudit uml_net_t { sysctl_t sysctl_net_t }:dir search; +dontaudit uml_net_t sysctl_net_t:file write; + +dontaudit { insmod_t ifconfig_t } uml_net_t:udp_socket { read write }; +dontaudit uml_net_t self:capability { sys_module }; + +domain_auto_trans_read(uml_net_t, insmod_exec_t, insmod_t) +domain_auto_trans_read(uml_net_t, ifconfig_exec_t, ifconfig_t) +allow uml_net_t tun_tap_device_t:chr_file { read write getattr ioctl }; +can_exec(uml_net_t, { shell_exec_t sbin_t }) + + +# this is really bad for security! +in_user_role({ insmod_t ifconfig_t }) +
file_contexts/program/nessusd.fc renamed from tmp/policy/file_contexts/program/nessusd.fc +6 -0
@@ -0,0 +1,6 @@ +# nessusd - network scanning server +/usr/sbin/nessusd system_u:object_r:nessusd_exec_t +/usr/lib/nessus/plugins/.* system_u:object_r:nessusd_exec_t +/var/lib/nessus(/.*)? system_u:object_r:nessusd_db_t +/var/log/nessus(/.*)? system_u:object_r:nessusd_log_t +/etc/nessus/nessusd.conf system_u:object_r:etc_nessusd_t
file_contexts/program/nsd.fc renamed from tmp/policy/file_contexts/program/nsd.fc +4 -0
@@ -0,0 +1,4 @@ +# nsd +/etc/nsd(/.*)? system_u:object_r:nsd_conf_t +/usr/sbin/nsd system_u:object_r:nsd_exec_t +/var/run/nsd.pid system_u:object_r:var_run_nsd_t
file_contexts/program/perdition.fc renamed from tmp/policy/file_contexts/program/perdition.fc +3 -0
@@ -0,0 +1,3 @@ +# perdition POP and IMAP proxy +/usr/sbin/perdition system_u:object_r:perdition_exec_t +/etc/perdition(/.*)? system_u:object_r:etc_perdition_t
file_contexts/program/uml_net.fc renamed from tmp/policy/file_contexts/program/uml_net.fc +2 -0
@@ -0,0 +1,2 @@ +# User Mode Linux +/usr/lib/uml/uml_net system_u:object_r:uml_net_exec_t
macros/program/uml_macros.te renamed from tmp/policy/macros/program/uml_macros.te +129 -0
129 lines not on this page · raw message
Quoted 3 lines · Russell Coker
I've attached a patch with policy for Perdition, nessus, nsd, and UML. Also it has a new file auth-net.te with the policy for doing network authentication (LDAP etc).
The attached patch is also needed for UML.
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
macros/user_macros.te renamed from tmp/policy/macros/user_macros.te +1 -0
@@ -133,6 +133,7 @@ ifdef(`crontab.te', `crontab_domain($1)') ifdef(`ssh.te', `ssh_domain($1)') ifdef(`irc.te', `irc_domain($1)') +ifdef(`uml.te', `uml_domain($1)') ifdef(`clamav.te', `user_clamscan_domain($1)') ifdef(`fingerd.te', `fingerd_macro($1)')