Skip to contentSkip to conversation

patch: Use etc_domain() where possible

PATCH Thomas Bleher 2 participants 2 messages Mar 30, 2005 – Apr 1, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

This patch uses etc_domain() where possible and makes type-names more consistent on the way.

Please apply.
Thomas

Signature · 2 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages
GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA  D09E C562 2BAE B2F4 ABE7
domains/program/unused/monopd.te +4 -3
diff -ur orig/domains/program/unused/monopd.te mod/domains/program/unused/monopd.te
@@ -10,9 +10,11 @@
 # Rules for the monopd_t domain.
 #
 daemon_domain(monopd)
+etc_domain(monopd)
+typealias monopd_etc_t alias etc_monopd_t;
 
-type etc_monopd_t, file_type, sysadmfile;
-type share_monopd_t, file_type, sysadmfile;
+type monopd_share_t, file_type, sysadmfile;
+typealias share_monopd_t alias share_monopd_t;
 
 # Use the network.
 can_network_server(monopd_t)
@@ -21,7 +23,6 @@
 type monopd_port_t, port_type;
 allow monopd_t monopd_port_t:tcp_socket name_bind;
 
-r_dir_file(monopd_t,etc_monopd_t)
 r_dir_file(monopd_t,share_monopd_t)
 
 allow monopd_t self:unix_dgram_socket create_socket_perms;
domains/program/unused/uptimed.te +3 -2
diff -ur orig/domains/program/unused/uptimed.te mod/domains/program/unused/uptimed.te
@@ -10,7 +10,6 @@
 # General Types
 #
 
-type etc_uptimed_t, file_type, sysadmfile;
 type uptimed_spool_t, file_type, sysadmfile;
 
 #################################
@@ -18,8 +17,10 @@
 # Rules for the uptimed_t domain.
 #
 daemon_domain(uptimed, `,privmail')
+etc_domain(uptimed)
+typealias uptimed_etc_t alias etc_uptimed_t;
 file_type_auto_trans(uptimed_t, var_spool_t, uptimed_spool_t)
-allow uptimed_t { etc_uptimed_t proc_t }:file { getattr read };
+allow uptimed_t proc_t:file { getattr read };
 read_locale(uptimed_t)
 allow uptimed_t uptimed_spool_t:file create_file_perms;
 allow uptimed_t self:unix_dgram_socket create_socket_perms;

Nur in mod/file_contexts: file_contexts.
Nur in mod/file_contexts: homedir_template.
Nur in mod/file_contexts: misc.

file_contexts/program/monopd.fc +2 -2
diff -ur orig/file_contexts/program/monopd.fc mod/file_contexts/program/monopd.fc
@@ -1,4 +1,4 @@
 # monopd
-/etc/monopd\.conf	--	system_u:object_r:etc_monopd_t
+/etc/monopd\.conf	--	system_u:object_r:monopd_etc_t
 /usr/sbin/monopd	--	system_u:object_r:monopd_exec_t
-/usr/share/monopd/games(/.*)?	system_u:object_r:share_monopd_t
+/usr/share/monopd/games(/.*)?	system_u:object_r:monopd_share_t
file_contexts/program/uptimed.fc +1 -1
diff -ur orig/file_contexts/program/uptimed.fc mod/file_contexts/program/uptimed.fc
@@ -1,4 +1,4 @@
 # uptimed
-/etc/uptimed\.conf	--	system_u:object_r:etc_uptimed_t
+/etc/uptimed\.conf	--	system_u:object_r:uptimed_etc_t
 /usr/sbin/uptimed	--	system_u:object_r:uptimed_exec_t
 /var/spool/uptimed(/.*)?        system_u:object_r:uptimed_spool_t

Nur in mod: tmp.

#1 lore raw

Merged.

Quoted 6 lines · Thomas Bleher

This patch uses etc_domain() where possible and makes type-names more consistent on the way.

Please apply.
Thomas

Signature · 8 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.