latest policy patch
This one has my latest patch. It's nothing serious at all.
A change to postgresql policy because the start scripts run "ps".
A new type for quota databases (which needs some improvement - apparently different versions of quota use different names, also needs support for multiple file systems).
The logrotate domain needs to read apache config files so it knows how to restart it.
update-modules needs to read some sysctl's (the tail program which is called from a script needs them). Could have used a dontaudit rule I guess, but for what update-modules is doing there's no reason to prevent such access (and a dontaudit rule could bite us later if the modutils change in an unexpected way).
tmpreaper needs to be able to unlink files of home_type so that "mv ~/file /tmp" on a machine with a single file system (/tmp and /home on the same filesystem), doesn't result in files under /tmp that tmpreaper can't remove. Sure there's probably lots of other ways of preventing tmpreaper from removing files, but this is a really common one that's easy to fix. tmpreaper can't search home_type directories so it can't invade your home dir either...
Steve, I think this is worthy of the CVS.
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/apache.te renamed from tmp/policy/domains/program/apache.te +4 -0
@@ -401,6 +401,10 @@ ################################################### allow httpd_t httpd_config_t:file r_file_perms; allow httpd_t httpd_config_t:dir r_dir_perms; +# allow logrotate to read the config files for restart +ifdef(`logrotate.te', ` +r_dir_file(logrotate_t, httpd_config_t) +') ################################################## ##################################################
domains/program/modutil.te renamed from tmp/policy/domains/program/modutil.te +2 -0
@@ -132,6 +132,8 @@ allow update_modules_t proc_t:dir search; allow update_modules_t proc_t:file r_file_perms; allow update_modules_t { self proc_t }:lnk_file read; +allow update_modules_t sysctl_kernel_t:dir search; +allow update_modules_t sysctl_kernel_t:file { getattr read }; allow update_modules_t self:dir search; allow update_modules_t self:unix_stream_socket create_socket_perms;
domains/program/mrtg.te renamed from tmp/policy/domains/program/mrtg.te +3 -0
@@ -72,4 +72,7 @@ # should not need this! allow mrtg_t sysadm_home_dir_t:dir { search read getattr }; dontaudit mrtg_t { boot_t device_t file_labels_t file_t lost_found_t }:dir getattr; +ifdef(`quota.te', ` +dontaudit mrtg_t quota_db_t:file getattr; +') dontaudit mrtg_t root_t:lnk_file getattr;
domains/program/passwd.te renamed from tmp/policy/domains/program/passwd.te +3 -0
@@ -21,6 +21,9 @@ domain_auto_trans(userdomain, passwd_exec_t, passwd_t) domain_auto_trans(sysadm_t, admin_passwd_exec_t, passwd_t) +# for vipw - vi looks in the root home directory for config +dontaudit passwd_t sysadm_home_dir_t:dir { getattr search }; + # Use capabilities. allow passwd_t passwd_t:capability { chown dac_override fsetid setuid sys_resource };
domains/program/postgresql.te renamed from tmp/policy/domains/program/postgresql.te +1 -1
@@ -56,7 +56,7 @@ # allow any user domain to connect to the database server can_tcp_connect(userdomain, postgresql_t) -allow postgresql_t proc_t:file { getattr read }; +allow postgresql_t { proc_t self }:file { getattr read }; allow postgresql_t fs_t:filesystem getattr; # Allow access to the postgresql databases
domains/program/quota.te renamed from tmp/policy/domains/program/quota.te +3 -2
@@ -10,6 +10,7 @@ daemon_base_domain(quota) type quota_flag_t, file_type, sysadmfile; +type quota_db_t, file_type, sysadmfile; rw_dir_create_file(initrc_t, quota_flag_t)
@@ -17,8 +18,8 @@ allow quota_t self:capability sys_admin; allow quota_t file_t:file quotaon; -# for /quota.* - should setup a new type for it -allow quota_t file_t:file { read write }; +# for /quota.* +allow quota_t quota_db_t:file { read write }; # Read /etc/mtab. allow quota_t etc_runtime_t:file { read getattr };
domains/program/tmpreaper.te renamed from tmp/policy/domains/program/tmpreaper.te +1 -1
@@ -19,9 +19,9 @@ allow tmpreaper_t fcron_t:fd use; allow tmpreaper_t fcron_t:fifo_file { read write }; ') -create_dir_file(tmpreaper_t, tmpfile) allow tmpreaper_t tmpfile:dir { rw_dir_perms rmdir }; allow tmpreaper_t tmpfile:notdevfile_class_set { getattr unlink }; +allow tmpreaper_t home_type:notdevfile_class_set { getattr unlink }; allow tmpreaper_t self:process { fork sigchld }; allow tmpreaper_t self:capability { dac_override dac_read_search fowner };
file_contexts/program/fingerd.fc renamed from tmp/policy/file_contexts/program/fingerd.fc +1 -1
@@ -1,6 +1,6 @@ # fingerd /usr/sbin/in.fingerd system_u:object_r:fingerd_exec_t /usr/sbin/[cef]fingerd system_u:object_r:fingerd_exec_t -/etc/cron.weekly/fingerd system_u:object_r:fingerd_exec_t +/etc/cron.weekly/(c)?fingerd system_u:object_r:fingerd_exec_t /etc/cfingerd(/.*)? system_u:object_r:etc_fingerd_t /var/log/cfingerd.log.* system_u:object_r:var_log_fingerd_t
file_contexts/program/quota.fc renamed from tmp/policy/file_contexts/program/quota.fc +1 -0
@@ -1,3 +1,4 @@ # quota system /var/lib/quota(/.*)? system_u:object_r:quota_flag_t /sbin/quota(check|on) system_u:object_r:quota_exec_t +/quota.(user|group) system_u:object_r:quota_db_t
macros/program/ssh_macros.te renamed from tmp/policy/macros/program/ssh_macros.te +3 -0
@@ -31,6 +31,9 @@ # This domain is granted permissions common to most domains (including can_net) every_domain($1_ssh_t) +# for sshing to a ssh tunnel +can_tcp_connect($1_ssh_t, $1_ssh_t) + # Use capabilities. allow $1_ssh_t self:capability { setuid setgid dac_override dac_read_search };
Quoted 1 line · Russell Coker
This one has my latest patch. It's nothing serious at all.
Will you update your policy.tgz file on coker.com.au as well? I've deviated somewhat from the old default policy, and believe it's easier and cleaner to install a new one and redo the few changes that were not added with the apache diff.
Signature · 8 lines
PGP/GPG key: http://web.lemuria.org/pubkey.html pub 1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]> Key fingerprint = C731 64D1 4BCF 4C20 48A4 29B2 BF01 9FA1 2D7A 04F5 -- 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 · Tom
Quoted 1 line · Russell Coker
This one has my latest patch. It's nothing serious at all.
Will you update your policy.tgz file on coker.com.au as well? I've deviated somewhat from the old default policy, and believe it's easier and cleaner to install a new one and redo the few changes that were not added with the apache diff.
OK. But why not just use the Debian package for this?
Signature · 10 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
Quoted 4 lines
Will you update your policy.tgz file on coker.com.au as well? I've deviated somewhat from the old default policy, and believe it's easier and cleaner to install a new one and redo the few changes that were not added with the apache diff.
OK. But why not just use the Debian package for this?
I can extract the .tgz to some other directory and check for diffs _before_ applying it. :)
Signature · 8 lines
PGP/GPG key: http://web.lemuria.org/pubkey.html pub 1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]> Key fingerprint = C731 64D1 4BCF 4C20 48A4 29B2 BF01 9FA1 2D7A 04F5 -- 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 · Tom
Quoted 6 lines · Russell Coker
Quoted 4 lines
Will you update your policy.tgz file on coker.com.au as well? I've deviated somewhat from the old default policy, and believe it's easier and cleaner to install a new one and redo the few changes that were not added with the apache diff.
OK. But why not just use the Debian package for this?
I can extract the .tgz to some other directory and check for diffs _before_ applying it. :)
Of course you could just run the following command when it first asks you about changing policy:
diff -ru /usr/share/selinux/policy/default /usr/share/selinux/policy/current \
| grep -v ^Only
Signature · 10 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 4 lines · Russell Coker
Of course you could just run the following command when it first asks you about changing policy:
diff -ru/usr/share/selinux/policy/default/usr/share/selinux/policy/current\
| grep -v ^Only
One suggestion with selinux-policy-default:
Installing the new policy should be optional when installing the Debian package. Perhaps with a config option /etc/selinux-policy.conf (maybe) or an extra question (but I am not a fan of all of these questions...).
I have, in the past, broken my running SE-Linux config, because it has installed /usr/share/selinux/policy/current into the running kernel, but I am not yet ready to use it...
(eg. once this occured when I deleted the "user bam" option. I intended to fix this, but with the new kernel policy loaded, it would no longer let me log in as sysadm_r, saying my current context was invalid).
Signature · 6 lines
Brian May <[email protected]> -- 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 · Brian May
One suggestion with selinux-policy-default:
Installing the new policy should be optional when installing the Debian package. Perhaps with a config option
/etc/selinux-policy.conf(maybe) or an extra question (but I am not a fan of all of these questions...).
Yes, please. It could simply check if a policy is already installed, and if so, ask "should I update your policy?" just like every other debian package does before changing config files. It could then automatically step over all the files that I choose not to have the first time, to reduce the number of questions asked.
Signature · 8 lines
http://web.lemuria.org/pubkey.html pub 1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]> Key fingerprint = C731 64D1 4BCF 4C20 48A4 29B2 BF01 9FA1 2D7A 04F5 -- 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 · Tom
Quoted 5 lines · Brian May
One suggestion with selinux-policy-default:
Installing the new policy should be optional when installing the Debian package. Perhaps with a config option
/etc/selinux-policy.conf(maybe) or an extra question (but I am not a fan of all of these questions...).
Quoted 5 lines
Yes, please. It could simply check if a policy is already installed, and if so, ask "should I update your policy?" just like every other debian package does before changing config files. It could then automatically step over all the files that I choose not to have the first time, to reduce the number of questions asked.
OK. I'll make an upgrade ask you "update yes/no/never".
Signature · 10 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 1 line · Russell Coker
This one has my latest patch. It's nothing serious at all.
Thanks, merged.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
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.