Skip to contentSkip to conversation

policy patches

PATCH Russell Coker 2 participants 3 messages Jan 2, 2005 – Jan 5, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

network_macros.diff makes a cosmetic change to the network macros.

quota.diff enables converting quota files from old format to new format and adds access to raw disk devices which seems to be needed by the newer versions of the quota utilities.

screen.diff allows screen access to proc files so that it can display the uptime and other trivial stuff. Screen can work without this, but it's handy to have it and proc_t is hardly restricted anyway.

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/quota.fc renamed from usr/src/se/policy/file_contexts/program/quota.fc +5 -0
@@ -1,5 +1,10 @@
 # quota system
 /var/lib/quota(/.*)?		system_u:object_r:quota_flag_t
 /sbin/quota(check|on)	--	system_u:object_r:quota_exec_t
+ifdef(`distro_redhat', `
+/usr/sbin/convertquota	--	system_u:object_r:quota_exec_t
+', `
+/sbin/convertquota	--	system_u:object_r:quota_exec_t
+')
 HOME_ROOT/a?quota\.(user|group) -- system_u:object_r:quota_db_t
 /var/a?quota\.(user|group) -- system_u:object_r:quota_db_t
program/unused/quota.te renamed from usr/src/se/policy/domains/program/unused/quota.te +3 -1
@@ -10,7 +10,7 @@
 #
 # needs auth attribute because it has read access to shadow_t because checkquota
 # is buggy
-daemon_base_domain(quota, `, auth')
+daemon_base_domain(quota, `, auth, fs_domain')
 
 # so the administrator can run quotacheck
 domain_auto_trans(sysadm_t, quota_exec_t, quota_t)
@@ -39,6 +39,8 @@
 allow quota_t file_type:lnk_file { read getattr };
 allow quota_t device_type:{ chr_file blk_file } getattr;
 
+allow quota_t fixed_disk_device_t:blk_file { getattr read };
+
 # for /quota.*
 allow quota_t quota_db_t:file { read write };
 dontaudit unpriv_userdomain quota_db_t:file getattr;
network_macros.te renamed from usr/src/se/policy/macros/network_macros.te +2 -1
@@ -79,11 +79,12 @@
 # Permissions for accessing the network.
 # See types/network.te for the network types.
 # See net_contexts for security contexts for network entities.
+# Combination of can_network_client_tcp() and can_network_server_tcp()
 #
 define(`can_network_tcp',`
 
 can_network_server_tcp($1, `$2')
-can_network_client_tcp($1, `$2')
+allow $1 self:tcp_socket { connect };
 
 ')
 
program/screen_macros.te renamed from usr/src/se/policy/macros/program/screen_macros.te +1 -0
@@ -87,6 +87,7 @@
 
 # get stats
 allow $1_screen_t proc_t:dir search;
+allow $1_screen_t proc_t:file { getattr read };
 allow $1_screen_t proc_t:lnk_file read;
 allow $1_screen_t etc_t:{ file lnk_file } { read getattr };
 allow $1_screen_t self:dir { search read };
#1 lore raw
Quoted 1 line · Russell Coker

network_macros.diff makes a cosmetic change to the network macros.

I don't see the benefit of this, the compiler will take care of the duplicate rules, and it is easier to maintain as is.

If this were the only thing producing duplicate rules, then it might be worthwhile.

If we were going to change it, wouldn't this be better anyway?

define(can_network_tcp', base_can_network($1, tcp, `$2')
allow $1 self:tcp_socket { listen accept connect }; ')

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.
#2 lore raw
In reply to Russell Coker

Merged quota and screen patches.

Quoted 9 lines · Russell Coker

network_macros.diff makes a cosmetic change to the network macros.

quota.diff enables converting quota files from old format to new format and adds access to raw disk devices which seems to be needed by the newer versions of the quota utilities.

screen.diff allows screen access to proc files so that it can display the uptime and other trivial stuff. Screen can work without this, but it's handy to have it and proc_t is hardly restricted anyway.

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.