Skip to contentSkip to conversation

proposed patch: policy management

PATCH Frank Mayer 2 participants 8 messages Jul 29, 2002 – Aug 16, 2002

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

Attached is the proposed patch I promised for policy management. To apply the patch, use patch -p1 from within the policy directory. Once applied, you should run make install-src and then perform all other actions from the /etc/security/selinux/src/policy directory. If you don't relabel, the make sure you run:

chcon -R system_u:object_r:policy_src_t /etc/security/selinux/src/policy

to get the labels correct. Below is a summary changes made (there were
more than expected). Comments are appreciated. Frank

============================================================

# change summary for policy management changes

./attrib.te:
1. add policyfiles and login_context attribs

./types/security.te
1, removed sysadmfile from policy_src_t and policy_config_t
2. moved cron_context_t from crond.te
3. added default_context_t
4. added new attribs policyfiles and login_contexts as appropriate

./domain/programs/login.te
1. Gave local_login_t and remote_login_t read access to login_contexts files

./domains/programs/initrc.te
1. Gave initrc read access to login_contexts

./domains/program/crond.te
1. remove sysadmfile attrib from from cron_context_t
2. add new attribs policyfiles and login_contexts
3. move cron_context_t declaration to security.te
4. Gave crond read access to cron_context_t (since we removed sysadmfile attrib)

./domains/programs/sshd.te
1. Gave sshd read access to login_contexts (though not sure sshd is using login contexts at this time?)

./macros/admin_macro.te
1. As temporary measure to allow sysadm_t the same current
ability to change policy files, add the following rules

allow $1_t policyfiles:notdevfile_class_set create_file_perms; allow $1_t policyfiles:dir create_dir_perms;

2. Removed security_t:security load_policy access from macro; only load_policy_t needs this.

./domains/programs/checkpolicy.te (new)
1. added types checkpolicy_t and checkpolicy_exec_t
2. added checkpolicy rules

./domains/programs/load_policy.te (new)
1. added types load_policy_t and load_policy_exec_t
2. added load_policy rules

./Makefile
1. Fixed policy.conf target to make tmp a dependent target; and to install policy.conf
2. Replaced policy target with testpolicy target to build a binary policy without directly installing it (as a result of the new checkpolicy domain).
3. Policy target now runs checkpolicy on installed policy.conf and outputs directly to the installed location (without gzip for now until zlib is incorporated directly into checkpolicy).
ISSUE: Can't use install -m 644 -u root -o group; not sure of general solution, but for now depend upon umask defaults.
4. Install target is now synonomous with policy target.
5. New install-src target added to install policy source directory; a new system installtion procedure is probably needed to include this step on initial system build??

changes to filecontexts:
1. added checkpolicy.fc (new)
2. added load_policy.fc (new)
3. moved cron_context.conf labeling from crond.fc to types.fc
4. within types.fc, added labels for following:
/etc/security/selinux/src/ /etc/security/default_context /etc/security/cron_context (from crond.fc)

new/Makefile renamed from Makefile +32 -11
diff -ruN ./Makefile ../new/Makefile
@@ -3,10 +3,12 @@
 #
 # Targets:
 # 
-# policy  - compile the policy configuration.
-# install - compile and install the policy configuration.
-# load    - compile, install, and load the policy configuration.
-# reload  - compile, install, and load/reload the policy configuration.
+# policy  - compile and install all policy configurations.
+# policy.conf - compile and install only the text policy configuration.
+# testpolicy - compile a test version of the test and binary policy configurations.
+# install - synonymous with policy.
+# load    - compile, install, and load all policy configurations.
+# reload  - compile, install, and load/reload all policy configuration.
 # relabel - relabel filesystems based on the file contexts configuration.
 #
 # The default target is 'policy'.
@@ -24,6 +26,9 @@
 INSTALLDIR = /etc/security/selinux
 LOADPATH = $(INSTALLDIR)/$(POLICYVER)
 INITRDLOADPATH = $(INSTALLDIR)/initrd-$(POLICYVER)
+SRCINSTALLDIR = $(INSTALLDIR)/src
+POLICYCONF = $(SRCINSTALLDIR)/policy.conf
+
 
 POLICYFILES = $(addprefix /usr/local/selinux/flask/,security_classes initial_sids access_vectors)
 ifeq ($(MLS),y)
@@ -39,11 +44,19 @@
 FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te))
 
 
-policy: $(POLICYVER)
+policy: $(LOADPATH) 
 
-$(POLICYVER):  tmp policy.conf $(CHECKPOLICY)
-	$(CHECKPOLICY) -o tmp/$@ policy.conf
-	gzip -c tmp/$@ > $@
+
+$(POLICYCONF): policy.conf
+	
+	
+$(SRCINSTALLDIR):
+	mkdir -p  $@ 
+	
+
+testpolicy: policy.conf $(CHECKPOLICY)
+	$(CHECKPOLICY) -o tmp/$(POLICYVER) policy.conf
+	gzip -c tmp/$(POLICYVER)> $(POLICYVER)	
 
 tmp:
 	mkdir tmp
@@ -58,9 +71,11 @@
 
 install-initrd: $(INITRDLOADPATH)
 
-$(LOADPATH): $(POLICYVER)
+$(LOADPATH):  $(POLICYCONF) $(CHECKPOLICY)
 	mkdir -p $(INSTALLDIR)
-	install -m 644 -o root -g root $(POLICYVER) $(LOADPATH)
+	$(CHECKPOLICY) -o $@ $(POLICYCONF)
+# Note: Can't use install, so not sure how to deal with mode, user, and group
+#	other than by default.
 
 $(INITRDLOADPATH): initrd-$(POLICYVER)
 	mkdir -p $(INSTALLDIR)
@@ -72,8 +87,14 @@
 
 load: tmp/load
 
-policy.conf: $(POLICYFILES) 
+install-src: 
+	mkdir -p $(SRCINSTALLDIR)/policy
+	cp -R . $(SRCINSTALLDIR)/policy
+
+policy.conf: tmp $(POLICYFILES) $(SRCINSTALLDIR)
 	m4 -Imacros -s $(POLICYFILES) > policy.conf
+	install -m 644 -o root -g root policy.conf $(POLICYCONF)
+
 
 initrd-policy.conf: $(INITRDPOLICYFILES) 
 	m4 -Imacros -s $(INITRDPOLICYFILES) > initrd-policy.conf
new/attrib.te renamed from attrib.te +13 -0
diff -ruN ./attrib.te ../new/attrib.te
@@ -211,3 +211,16 @@
 # traffic sent to or received from the node.
 attribute node_type;
 
+
+##############################
+# Attributes for security policy types:
+#
+
+# The login_contexts attribute idenitifies the files used
+# to define default contexts for login and cron.
+attribute login_contexts;
+
+# The policyfiles attribute idenitified the files that are
+# used to build, modify, manage, and implement the SE Linux
+# security policy.
+attribute policyfiles;
new/domains/program/checkpolicy.te renamed from domains/program/checkpolicy.te +62 -0

62 lines not on this page · raw message

new/domains/program/crond.te renamed from domains/program/crond.te +0 -2
diff -ruN ./domains/program/crond.te ../new/domains/program/crond.te
@@ -28,8 +28,6 @@
 # Type for the anacron executable.
 type anacron_exec_t, file_type, sysadmfile, exec_type;
 
-# Type for the /etc/security/cron_context file.
-type cron_context_t, file_type, sysadmfile;
 
 # Type for temporary files.
 type crond_tmp_t, file_type, sysadmfile, tmpfile;
new/domains/program/initrc.te renamed from domains/program/initrc.te +3 -0
diff -ruN ./domains/program/initrc.te ../new/domains/program/initrc.te
@@ -46,6 +46,9 @@
 # Read conf.modules.
 allow initrc_t modules_conf_t:file r_file_perms;
 
+# Read login context files in /etc/security
+allow initrc_t login_contexts:file r_file_perms;
+
 # Run other rc scripts in the initrc_t domain.
 can_exec(initrc_t, initrc_exec_t)
 
new/domains/program/load_policy.te renamed from domains/program/load_policy.te +51 -0

52 lines not on this page · raw message

new/domains/program/login.te renamed from domains/program/login.te +6 -0
diff -ruN ./domains/program/login.te ../new/domains/program/login.te
@@ -92,6 +92,9 @@
 allow local_login_t var_run_t:dir rw_dir_perms;
 allow local_login_t var_run_t:file create_file_perms;
 
+# allow read access to login contexts in /etc/security
+allow local_login_t login_contexts:file r_file_perms;
+
 
 #################################
 #
@@ -142,3 +145,6 @@
 ifdef(`rlogind.te',
 `allow remote_login_t rlogind_devpts_t:chr_file { relabelfrom relabelto };')
 allow remote_login_t ptyfile:chr_file { getattr relabelfrom relabelto };
+
+# allow read access to login contexts in /etc/security
+allow remote_login_t login_contexts:file r_file_perms;
new/domains/program/sshd.te renamed from domains/program/sshd.te +4 -0
diff -ruN ./domains/program/sshd.te ../new/domains/program/sshd.te
@@ -132,3 +132,7 @@
 allow sshd_t mail_spool_t:dir search;
 allow sshd_t mail_spool_t:lnk_file read;
 allow sshd_t mail_spool_t:file getattr;
+
+# Allow read access to login context
+allow sshd_login_t login_contexts:file r_file_perms;
+
new/file_contexts/program/checkpolicy.fc renamed from file_contexts/program/checkpolicy.fc +3 -0
diff -ruN ./file_contexts/program/checkpolicy.fc ../new/file_contexts/program/checkpolicy.fc
@@ -0,0 +1,3 @@
+# checkpolicy
+/usr/local/selinux/bin/checkpolicy	system_u:object_r:checkpolicy_exec_t
+/usr/local/bin/checkpolicy		system_u:object_r:checkpolicy_exec_t
new/file_contexts/program/crond.fc renamed from file_contexts/program/crond.fc +0 -1
diff -ruN ./file_contexts/program/crond.fc ../new/file_contexts/program/crond.fc
@@ -1,7 +1,6 @@
 # crond
 /etc/crontab			system_u:object_r:system_crond_script_t
 /etc/cron.d(|/.*)		system_u:object_r:system_crond_script_t
-/etc/security/cron_context.*	system_u:object_r:cron_context_t
 /usr/sbin/cron(|d)		system_u:object_r:crond_exec_t
 /usr/sbin/anacron		system_u:object_r:anacron_exec_t
 /usr/sbin/fcron			system_u:object_r:anacron_exec_t
new/file_contexts/program/load_policy.fc renamed from file_contexts/program/load_policy.fc +3 -0
diff -ruN ./file_contexts/program/load_policy.fc ../new/file_contexts/program/load_policy.fc
@@ -0,0 +1,3 @@
+# load_policy
+/usr/local/selinux/bin/load_policy	system_u:object_r:load_policy_exec_t
+/usr/local/bin/load_policy		system_u:object_r:load_policy_exec_t
new/file_contexts/types.fc renamed from file_contexts/types.fc +3 -0
diff -ruN ./file_contexts/types.fc ../new/file_contexts/types.fc
@@ -143,6 +143,9 @@
 /etc/mrtg(|/.*)			system_u:object_r:etc_mrtg_t
 /etc/selinux(|/.*)		system_u:object_r:policy_src_t
 /etc/security/selinux(|/.*)	system_u:object_r:policy_config_t	
+/etc/security/selinux/src(|/.*)	system_u:object_r:policy_src_t
+/etc/security/cron_context.*	system_u:object_r:cron_context_t
+/etc/security/default_context.*	system_u:object_r:default_context_t
 
 #
 # /lib
new/macros/admin_macros.te renamed from macros/admin_macros.te +10 -2
diff -ruN ./macros/admin_macros.te ../new/macros/admin_macros.te
@@ -63,8 +63,15 @@
 # Run admin programs that require different permissions in their own domain.
 # These rules were moved into the appropriate program domain file.
 
-# Reload the policy configuration.
-allow $1_t security_t:security load_policy;
+# added by [email protected]
+#
+# The following rules are temporary until such time that a complete
+# policy management infrastructure is in place so that an administrator
+# cannot directly manipulate policy files with arbitrary programs.
+#
+allow $1_t policyfiles:notdevfile_class_set create_file_perms;
+allow $1_t policyfiles:dir create_dir_perms;
+
 
 # Relabel all files.
 allow $1_t file_type:dir { getattr read search relabelfrom relabelto };
@@ -134,3 +141,4 @@
 allow $1_t console_device_t:chr_file rw_file_perms;
 
 ')
+
new/types/security.te renamed from types/security.te +14 -2
diff -ruN ./types/security.te ../new/types/security.te
@@ -21,13 +21,25 @@
 # policy_config_t is the type of /ss_policy,
 # the security server policy configuration.
 #
-type policy_config_t, file_type, sysadmfile;
+type policy_config_t, file_type;
 
 #
 # policy_src_t is the type of the policy source
 # files.
 #
-type policy_src_t, file_type, sysadmfile;
+type policy_src_t, file_type, policyfiles;
+
+#
+# default_context_t is the type applied to 
+# /etc/security/default_context
+#
+type default_context_t, file_type, login_contexts, policyfiles;
+
+#
+# Type for the /etc/security/cron_context file.
+# (previously defined in cron.te
+#
+type cron_context_t, file_type, login_contexts, policyfiles;
 
 #
 # file_labels_t is the type of the persistent
#1 lore raw
Quoted 9 lines

Attached is the proposed patch I promised for policy management. To apply the patch, use patch -p1 from within the policy directory. Once applied, you should run make install-src and then perform all other actions from the
/etc/security/selinux/src/policy directory. If you don't relabel, the make sure you run:

chcon -R system_u:object_r:policy_src_t /etc/security/selinux/src/policy

If you don't make relabel, you also need to do the following to fix labels.

chcon system_u:object_r:default_context_t /etc/security/default_context chcon system_u:object_r:load_policy_exec_t /usr/local/selinux/bin/load_policy
chcon system_u:object_r:checkpolicy_exec_t /usr/local/selinux/bin/checkpolicy

--
You have received this message because you are subscribed to the selinux 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 Frank Mayer
Quoted 1 line · Frank Mayer

Attached is the proposed patch I promised for policy management.

Thanks for the patch. Some comments are provided below.
You might also want to update to the head of the sourceforge selinux CVS tree and generate your patches relative to it.

Quoted 5 lines

============================================================

# change summary for policy management changes

./attrib.te:
1. add policyfiles and login_context attribs

Why did you decide to group default_context_t and cron_context_t into login_context? The login and sshd programs only require read access to default_context, while crond only requires read access to cron_context. However, it is true that cron_context is expected to go away eventually and default_context will be replaced by the more general configuration for all daemons.

The purpose of the policyfiles attribute is unclear at present. You only use it for temporary rules in admin_macros.te to preserve the original policy when these types had the sysadmfile attribute. I'm a little uneasy about grouping policy_src_t with the *_context_t types, since the former defines the policy and the latter merely provides defaults that must still be approved by the policy.

Quoted 6 lines

./types/security.te
1, removed sysadmfile from policy_src_t and policy_config_t
2. moved cron_context_t from crond.te
3. added default_context_t
4. added new attribs policyfiles and login_contexts as appropriate

The cron_context file is only meaningful if crond is being used, so it is preferable to keep it in crond.te.

Quoted 3 lines

./domain/programs/login.te
1. Gave local_login_t and remote_login_t read access to login_contexts files

As noted above, these domains only require access to default_context_t.

Quoted 2 lines

./domains/programs/initrc.te
1. Gave initrc read access to login_contexts

Why do the init scripts need to read these files?

Quoted 6 lines

./domains/program/crond.te
1. remove sysadmfile attrib from from cron_context_t
2. add new attribs policyfiles and login_contexts
3. move cron_context_t declaration to security.te
4. Gave crond read access to cron_context_t (since we removed sysadmfile attrib)

Nit: #4 was already present and is not part of the patch.

Review

Quoted 3 lines

./domains/programs/sshd.te

(quoted diff) +0 -0
 	1. Gave sshd read access to login_contexts (though not sure
 	sshd is using login contexts at this time?)

Both sshd_t and sshd_login_t should be granted read access to default_context_t. The sshd program (sshd_t) reads the file to obtain the default user context. If sshd is configured to use login (not the default), then the login program is run in sshd_login_t and will try to read the default user context.

Quoted 7 lines

./Makefile
1. Fixed policy.conf target to make tmp a dependent target; and to install policy.conf
2. Replaced policy target with testpolicy target to build a binary policy without directly installing it (as a result of the new checkpolicy domain).
3. Policy target now runs checkpolicy on installed policy.conf

Quoted 8 lines

and outputs directly to the installed location (without gzip for now until zlib is incorporated directly into checkpolicy).
ISSUE: Can't use install -m 644 -u root -o group; not sure of general solution, but for now depend upon umask defaults.
4. Install target is now synonomous with policy target.
5. New install-src target added to install policy source directory; a new system installtion procedure is probably needed to include this step on initial system build??

Conventionally, you should be able to do a 'make' without privileges to build something and then do a 'make install' to install it, possibly requiring privilege depending on where you install. I see that you've tried to preserve the ability to do a local build via the 'testpolicy' target (nit: conflicts with an existing target I have for a test configuration that differs from the example configuration), but I'd rather just keep 'policy' as it is, and only change the 'install' target.

If you use the 'install-src' target, and subsequently perform all builds from /etc/security/selinux/src/policy, you'll end up building policy.conf in that directory and then "installing" it one level up. Is that really what you want? I understand that you also want to support the situation where the policy source is not installed, just policy.conf.

I suppose we could add -m, -o, and -g options directly to checkpolicy for direct installation purposes.

It looks like the $(SRCINSTALLDIR) dependency and the install statement associated with policy.conf really belong to $(POLICYCONF). Right?

Quoted 8 lines

changes to filecontexts:
1. added checkpolicy.fc (new)
2. added load_policy.fc (new)
3. moved cron_context.conf labeling from crond.fc to types.fc
4. within types.fc, added labels for following:
/etc/security/selinux/src/ /etc/security/default_context /etc/security/cron_context (from crond.fc)

As with the crond.te change, I don't think we want to move the cron_context_t file context specification to types.fc, as it is only relevant if you are using crond.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw

Thanks, further comments are below.

Quoted 9 lines
Quoted 2 lines

./attrib.te:
1. add policyfiles and login_context attribs

Why did you decide to group default_context_t and cron_context_t into login_context? The login and sshd programs only require read access to default_context, while crond only requires read access to cron_context. However, it is true that cron_context is expected to go away eventually and default_context will be replaced by the more general configuration for all daemons.

I'm looking ahead at policy management tools and capabilities. So for example a tool which manages user account aspects of a security policy and runs in its own domain (e.g., as we're trying to do with our seuser tool) must have the ability to write all "login context" files. I can imagine all sorts of new and different login context files being created in the future (e.g., a separate file for sshd); I just wanted a single reference for any and all for those cases where write access to all need be granted.

Quoted 3 lines

The purpose of the policyfiles attribute is unclear at present. You only use it for temporary rules in admin_macros.te to preserve the original policy when these types had the sysadmfile attribute.

Again I was looking forward to tools that must access policy files. However, originally I have policy_src_t and policy_config_t linked together and then decided to remove the config (binary) files. This along with your point below that the context files really aren't policy files makes me agree that policy_src_t suffices in and of itself.

Quoted 4 lines

I'm a little uneasy
about grouping policy_src_t with the *_context_t types, since the former defines the policy and the latter merely provides defaults that must still be approved by the policy.

See above. Agreed.

Aside: Interesting I read into your comments a desire to limit the use attributes. I would think that generous use of attributes would be encouraged as a way of providing logical affinity, if for nothing else, than for human analysis purposes. They're certainly harmless. At some point where we have fancy policy editors, I envision attributes being widely used as a means of providing the user with means of associating types, even if the attribute is not used in a rule.

Quoted 9 lines
Quoted 6 lines

./types/security.te
1, removed sysadmfile from policy_src_t and policy_config_t
2. moved cron_context_t from crond.te
3. added default_context_t
4. added new attribs policyfiles and login_contexts as appropriate

The cron_context file is only meaningful if crond is being used, so it is preferable to keep it in crond.te.

I guess I don't have a strong issue here. From a security management perspective it seems logical to group and collect the "login contexts" files together in the policy. But modularity of the policy for install options is as compelling, even more so in the current structure of the make directory.

Interesting that we can't do the same with default_context since login isn't the only program expected to use it. Is there a better place for it than security.te?

Quoted 5 lines
Quoted 3 lines

./domain/programs/login.te
1. Gave local_login_t and remote_login_t read access to login_contexts files

As noted above, these domains only require access to default_context_t.

OK, though I can imagine a day when there might be several different types of login context files depending on the type of login or user account management. Reading the contexts files was less of a concern than having the attribute for granting write access to policy editors.

Quoted 4 lines
Quoted 2 lines

./domains/programs/initrc.te
1. Gave initrc read access to login_contexts

Why do the init scripts need to read these files?

Not sure, we had the same question here. We seemed to keep getting audit messages if we didn't have this. Since initrc previously has access to the context files (since there were admfiles), it may not have arisen before. I will test again and let you know if indeed initrc keeps complaining about access to these file.

Quoted 7 lines
Quoted 7 lines

./Makefile
1. Fixed policy.conf target to make tmp a dependent target; and to install policy.conf
2. Replaced policy target with testpolicy target to build a binary policy without directly installing it (as a result of the new checkpolicy domain).
3. Policy target now runs checkpolicy on installed policy.conf

Quoted 8 lines
Quoted 8 lines

and outputs directly to the installed location (without gzip for now until zlib is incorporated directly into checkpolicy).
ISSUE: Can't use install -m 644 -u root -o group; not sure of general solution, but for now depend upon umask defaults.
4. Install target is now synonomous with policy target.
5. New install-src target added to install policy source directory; a new system installtion procedure is probably needed to include this step on initial system build??

First let me say that I struggled with the make file and welcome suggestions. Most issues result from a struggle with two distinct
perspective: 1) initial install and development for which the make file is best suited, and 2) as an operational management tool that must abide by the DTE policy where using make is more problematic.

Quoted 7 lines

Conventionally, you should be able to do a 'make' without privileges to build something and then do a 'make install' to install it, possibly requiring privilege depending on where you install. I see that you've tried to preserve the ability to do a local build via the 'testpolicy' target (nit: conflicts with an existing target I have for a test configuration that differs from the example configuration), but I'd rather just keep 'policy' as it is, and only change the 'install' target.

That makes sense; what that really means is policy target will build a temporary policy (once I fix the policy.conf issue below), and install will rebuild the policy this time directly into the installed location. It also means you can't build a test policy from the sysadm_t domain, as this will cause checkpolicy to change domain (but as you said, policy should be used without privilege). This also climates test-policy.

Quoted 5 lines

If you use the 'install-src' target, and subsequently perform all builds from /etc/security/selinux/src/policy, you'll end up building policy.conf in that directory and then "installing" it one level up. Is that really what you want? I understand that you also want to support the situation where the policy source is not installed, just policy.conf.

Vacillation my part! Originally I had the $(POLICYCONF) target dependent on policy.conf and install it. I remember changing it for a reason that I believe has to do with the policy target per above. Right now I think what I originally planned was correct, as it allowed one to build a test policy without privilege from a local policy.conf file. The install target would be
dependent on the $(POLICYCONF) target which would install it in the selinux/src
directory. Given your suggestion about install and policy, this should work. I'll look at it again.

Quoted 2 lines

I suppose we could add -m, -o, and -g options directly to checkpolicy for direct installation purposes.

Again I'm not sure how compelling this is, but at some point that might be useful (along with inclusion of zlib). Protection bits and DTE are orthogonal, and we probably shouldn't have a situation where one prevents us from doing what's correct in the other. Not sure of priority.

Quoted 2 lines

It looks like the $(SRCINSTALLDIR) dependency and the install statement associated with policy.conf really belong to $(POLICYCONF). Right?

Yes, see above. That's what I originally had and not exactly sure why I changed it.

Quoted 9 lines
Quoted 8 lines

changes to filecontexts:
1. added checkpolicy.fc (new)
2. added load_policy.fc (new)
3. moved cron_context.conf labeling from crond.fc to types.fc
4. within types.fc, added labels for following:
/etc/security/selinux/src/ /etc/security/default_context /etc/security/cron_context (from crond.fc)

Quoted 3 lines

As with the crond.te change, I don't think we want to move the cron_context_t file context specification to types.fc, as it is only relevant if you are using crond.

Ok per above. What about default_context...does that belong in security.te and types.fc?

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#4 lore raw
In reply to Stephen Smalley

One other thought: You might want to define a file_type_auto_trans rule for checkpolicy_t and policy_src_t, to permit checkpolicy to create files in the policy source directory while placing those files into a different type. You could use file_type_auto_trans(checkpolicy_t, policy_src_t, policy_config_t) to directly place these files into the policy_config_t type. Or you could define a different type for this purpose.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#5 lore raw

Ok attached is a new proposed policy management patches that (I hope) addresses comments received. I've made the diff from the latest sourceforge head as suggest. NOTE: I failed to generate a diff using cvs diff...which seems to want me to cvs add my new files before including them in the patch file using the -N option. I can't do cvs add, even without committing the changes, since the sourceforge site doesn't permit me access (as it should not). Probably my inexperience with CVS; I would welcome a private pointer on what I was doing wrong.

The summary of changes are listed below. Frank

==========================================

/attrib.te:
1. add login_context attrib; not used in default policy but provided to allow tools to grant access to all files associated with initial contexts

./types/security.te
1, removed sysadmfile from policy_src_t and policy_config_t; admin_marco.te will provide "temporary" access to policy_src_t as an interim measure.
2. added default_context_t, with sysadmfile and new login_contexts attributes (left sysadmfile since it's reasonable for an administrator in default installations to edit these file with an editor).

./domain/programs/login.te
1. Gave local_login_t and remote_login_t read access to default_context_t

./domains/program/crond.te
1. add new login_contexts attribute to cron_context

./domains/programs/sshd.te
1. Gave sshd_t and sshd_login_t read access to default_context_t

./macros/admin_macro.te
1. As temporary measure to allow sysadm_t the same current
ability to change policy src files, add the following rules

allow $1_t policy_src_t:notdevfile_class_set create_file_perms; allow $1_t policy_src_t:dir create_dir_perms;

2. Removed security_t:security load_policy access from macro; only load_policy_t needs this.

./domains/programs/checkpolicy.te (new)
1. added types checkpolicy_t and checkpolicy_exec_t
2. added checkpolicy rules

./domains/programs/load_policy.te (new)
1. added types load_policy_t and load_policy_exec_t
2. added load_policy rules

changes to filecontexts:
1. added checkpolicy.fc (new)
2. added load_policy.fc (new)
3. within types.fc, added labels for following:
/etc/security/selinux/src/ /etc/security/default_context

./Makefile
0. Did nothing with initrd stuff!
1. Fixed policy.conf target to make tmp a dependent target.
2. Install target invokes checkpolicy directly, and puts the results in the install dir (without gzip).
3. New install-src target added to install policy source directory

Needed:
1. A new system installation procedure is probably needed to include make install-src on initial system build.

2. zlib library built into checkpolicy

3. -o -g -m options in checkpolicy?

new/Makefile renamed from Makefile +32 -11
diff -ruN ./Makefile ../new/Makefile
@@ -3,10 +3,12 @@
 #
 # Targets:
 # 
-# policy  - compile the policy configuration.
-# install - compile and install the policy configuration.
-# load    - compile, install, and load the policy configuration.
-# reload  - compile, install, and load/reload the policy configuration.
+# policy  - compile and install all policy configurations.
+# policy.conf - compile and install only the text policy configuration.
+# testpolicy - compile a test version of the test and binary policy configurations.
+# install - synonymous with policy.
+# load    - compile, install, and load all policy configurations.
+# reload  - compile, install, and load/reload all policy configuration.
 # relabel - relabel filesystems based on the file contexts configuration.
 #
 # The default target is 'policy'.
@@ -24,6 +26,9 @@
 INSTALLDIR = /etc/security/selinux
 LOADPATH = $(INSTALLDIR)/$(POLICYVER)
 INITRDLOADPATH = $(INSTALLDIR)/initrd-$(POLICYVER)
+SRCINSTALLDIR = $(INSTALLDIR)/src
+POLICYCONF = $(SRCINSTALLDIR)/policy.conf
+
 
 POLICYFILES = $(addprefix /usr/local/selinux/flask/,security_classes initial_sids access_vectors)
 ifeq ($(MLS),y)
@@ -39,11 +44,19 @@
 FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te))
 
 
-policy: $(POLICYVER)
+policy: $(LOADPATH) 
 
-$(POLICYVER):  tmp policy.conf $(CHECKPOLICY)
-	$(CHECKPOLICY) -o tmp/$@ policy.conf
-	gzip -c tmp/$@ > $@
+
+$(POLICYCONF): policy.conf
+	
+	
+$(SRCINSTALLDIR):
+	mkdir -p  $@ 
+	
+
+testpolicy: policy.conf $(CHECKPOLICY)
+	$(CHECKPOLICY) -o tmp/$(POLICYVER) policy.conf
+	gzip -c tmp/$(POLICYVER)> $(POLICYVER)	
 
 tmp:
 	mkdir tmp
@@ -58,9 +71,11 @@
 
 install-initrd: $(INITRDLOADPATH)
 
-$(LOADPATH): $(POLICYVER)
+$(LOADPATH):  $(POLICYCONF) $(CHECKPOLICY)
 	mkdir -p $(INSTALLDIR)
-	install -m 644 -o root -g root $(POLICYVER) $(LOADPATH)
+	$(CHECKPOLICY) -o $@ $(POLICYCONF)
+# Note: Can't use install, so not sure how to deal with mode, user, and group
+#	other than by default.
 
 $(INITRDLOADPATH): initrd-$(POLICYVER)
 	mkdir -p $(INSTALLDIR)
@@ -72,8 +87,14 @@
 
 load: tmp/load
 
-policy.conf: $(POLICYFILES) 
+install-src: 
+	mkdir -p $(SRCINSTALLDIR)/policy
+	cp -R . $(SRCINSTALLDIR)/policy
+
+policy.conf: tmp $(POLICYFILES) $(SRCINSTALLDIR)
 	m4 -Imacros -s $(POLICYFILES) > policy.conf
+	install -m 644 -o root -g root policy.conf $(POLICYCONF)
+
 
 initrd-policy.conf: $(INITRDPOLICYFILES) 
 	m4 -Imacros -s $(INITRDPOLICYFILES) > initrd-policy.conf
new/attrib.te renamed from attrib.te +13 -0
diff -ruN ./attrib.te ../new/attrib.te
@@ -211,3 +211,16 @@
 # traffic sent to or received from the node.
 attribute node_type;
 
+
+##############################
+# Attributes for security policy types:
+#
+
+# The login_contexts attribute idenitifies the files used
+# to define default contexts for login and cron.
+attribute login_contexts;
+
+# The policyfiles attribute idenitified the files that are
+# used to build, modify, manage, and implement the SE Linux
+# security policy.
+attribute policyfiles;
new/domains/program/checkpolicy.te renamed from domains/program/checkpolicy.te +62 -0

62 lines not on this page · raw message

new/domains/program/crond.te renamed from domains/program/crond.te +0 -2
diff -ruN ./domains/program/crond.te ../new/domains/program/crond.te
@@ -28,8 +28,6 @@
 # Type for the anacron executable.
 type anacron_exec_t, file_type, sysadmfile, exec_type;
 
-# Type for the /etc/security/cron_context file.
-type cron_context_t, file_type, sysadmfile;
 
 # Type for temporary files.
 type crond_tmp_t, file_type, sysadmfile, tmpfile;
new/domains/program/initrc.te renamed from domains/program/initrc.te +3 -0
diff -ruN ./domains/program/initrc.te ../new/domains/program/initrc.te
@@ -46,6 +46,9 @@
 # Read conf.modules.
 allow initrc_t modules_conf_t:file r_file_perms;
 
+# Read login context files in /etc/security
+allow initrc_t login_contexts:file r_file_perms;
+
 # Run other rc scripts in the initrc_t domain.
 can_exec(initrc_t, initrc_exec_t)
 
new/domains/program/load_policy.te renamed from domains/program/load_policy.te +51 -0

52 lines not on this page · raw message

new/domains/program/login.te renamed from domains/program/login.te +6 -0
diff -ruN ./domains/program/login.te ../new/domains/program/login.te
@@ -92,6 +92,9 @@
 allow local_login_t var_run_t:dir rw_dir_perms;
 allow local_login_t var_run_t:file create_file_perms;
 
+# allow read access to login contexts in /etc/security
+allow local_login_t login_contexts:file r_file_perms;
+
 
 #################################
 #
@@ -142,3 +145,6 @@
 ifdef(`rlogind.te',
 `allow remote_login_t rlogind_devpts_t:chr_file { relabelfrom relabelto };')
 allow remote_login_t ptyfile:chr_file { getattr relabelfrom relabelto };
+
+# allow read access to login contexts in /etc/security
+allow remote_login_t login_contexts:file r_file_perms;
new/domains/program/sshd.te renamed from domains/program/sshd.te +4 -0
diff -ruN ./domains/program/sshd.te ../new/domains/program/sshd.te
@@ -132,3 +132,7 @@
 allow sshd_t mail_spool_t:dir search;
 allow sshd_t mail_spool_t:lnk_file read;
 allow sshd_t mail_spool_t:file getattr;
+
+# Allow read access to login context
+allow sshd_login_t login_contexts:file r_file_perms;
+
new/file_contexts/program/checkpolicy.fc renamed from file_contexts/program/checkpolicy.fc +3 -0
diff -ruN ./file_contexts/program/checkpolicy.fc ../new/file_contexts/program/checkpolicy.fc
@@ -0,0 +1,3 @@
+# checkpolicy
+/usr/local/selinux/bin/checkpolicy	system_u:object_r:checkpolicy_exec_t
+/usr/local/bin/checkpolicy		system_u:object_r:checkpolicy_exec_t
new/file_contexts/program/crond.fc renamed from file_contexts/program/crond.fc +0 -1
diff -ruN ./file_contexts/program/crond.fc ../new/file_contexts/program/crond.fc
@@ -1,7 +1,6 @@
 # crond
 /etc/crontab			system_u:object_r:system_crond_script_t
 /etc/cron.d(|/.*)		system_u:object_r:system_crond_script_t
-/etc/security/cron_context.*	system_u:object_r:cron_context_t
 /usr/sbin/cron(|d)		system_u:object_r:crond_exec_t
 /usr/sbin/anacron		system_u:object_r:anacron_exec_t
 /usr/sbin/fcron			system_u:object_r:anacron_exec_t
new/file_contexts/program/load_policy.fc renamed from file_contexts/program/load_policy.fc +3 -0
diff -ruN ./file_contexts/program/load_policy.fc ../new/file_contexts/program/load_policy.fc
@@ -0,0 +1,3 @@
+# load_policy
+/usr/local/selinux/bin/load_policy	system_u:object_r:load_policy_exec_t
+/usr/local/bin/load_policy		system_u:object_r:load_policy_exec_t
new/file_contexts/types.fc renamed from file_contexts/types.fc +3 -0
diff -ruN ./file_contexts/types.fc ../new/file_contexts/types.fc
@@ -143,6 +143,9 @@
 /etc/mrtg(|/.*)			system_u:object_r:etc_mrtg_t
 /etc/selinux(|/.*)		system_u:object_r:policy_src_t
 /etc/security/selinux(|/.*)	system_u:object_r:policy_config_t	
+/etc/security/selinux/src(|/.*)	system_u:object_r:policy_src_t
+/etc/security/cron_context.*	system_u:object_r:cron_context_t
+/etc/security/default_context.*	system_u:object_r:default_context_t
 
 #
 # /lib
new/macros/admin_macros.te renamed from macros/admin_macros.te +10 -2
diff -ruN ./macros/admin_macros.te ../new/macros/admin_macros.te
@@ -63,8 +63,15 @@
 # Run admin programs that require different permissions in their own domain.
 # These rules were moved into the appropriate program domain file.
 
-# Reload the policy configuration.
-allow $1_t security_t:security load_policy;
+# added by [email protected]
+#
+# The following rules are temporary until such time that a complete
+# policy management infrastructure is in place so that an administrator
+# cannot directly manipulate policy files with arbitrary programs.
+#
+allow $1_t policyfiles:notdevfile_class_set create_file_perms;
+allow $1_t policyfiles:dir create_dir_perms;
+
 
 # Relabel all files.
 allow $1_t file_type:dir { getattr read search relabelfrom relabelto };
@@ -134,3 +141,4 @@
 allow $1_t console_device_t:chr_file rw_file_perms;
 
 ')
+
new/types/security.te renamed from types/security.te +14 -2
diff -ruN ./types/security.te ../new/types/security.te
@@ -21,13 +21,25 @@
 # policy_config_t is the type of /ss_policy,
 # the security server policy configuration.
 #
-type policy_config_t, file_type, sysadmfile;
+type policy_config_t, file_type;
 
 #
 # policy_src_t is the type of the policy source
 # files.
 #
-type policy_src_t, file_type, sysadmfile;
+type policy_src_t, file_type, policyfiles;
+
+#
+# default_context_t is the type applied to 
+# /etc/security/default_context
+#
+type default_context_t, file_type, login_contexts, policyfiles;
+
+#
+# Type for the /etc/security/cron_context file.
+# (previously defined in cron.te
+#
+type cron_context_t, file_type, login_contexts, policyfiles;
 
 #
 # file_labels_t is the type of the persistent
#6 lore raw

It's been pointed out to me that I mistakenly posted the original proposed policy patch rather than the updated version. I've (hopefully) attached the correct patch file here. Sorry for the mix up!
Frank

Quoted 82 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Frank Mayer
Sent: Thursday, August 01, 2002 3:48 PM
To: NSA Selinux Mailinglist
Subject: RE: proposed patch: policy management

Ok attached is a new proposed policy management patches that (I hope) addresses comments received. I've made the diff from the latest sourceforge
head as suggest. NOTE: I failed to generate a diff using cvs diff...which seems to want me to cvs add my new files before including them in the patch
file using the -N option. I can't do cvs add, even without committing the changes, since the sourceforge site doesn't permit me access (as it should not). Probably my inexperience with CVS; I would welcome a private pointer
on what I was doing wrong.

The summary of changes are listed below. Frank

==========================================

/attrib.te:
1. add login_context attrib; not used in default policy but provided to allow tools to grant access to all files associated with initial contexts

./types/security.te
1, removed sysadmfile from policy_src_t and policy_config_t; admin_marco.te will provide "temporary" access to policy_src_t as an interim measure.
2. added default_context_t, with sysadmfile and new login_contexts attributes (left sysadmfile since it's reasonable for an
administrator
in default installations to edit these file with an editor).

./domain/programs/login.te
1. Gave local_login_t and remote_login_t read access to default_context_t

./domains/program/crond.te
1. add new login_contexts attribute to cron_context

./domains/programs/sshd.te
1. Gave sshd_t and sshd_login_t read access to default_context_t

./macros/admin_macro.te
1. As temporary measure to allow sysadm_t the same current
ability to change policy src files, add the following rules

allow $1_t policy_src_t:notdevfile_class_set create_file_perms; allow $1_t policy_src_t:dir create_dir_perms;

2. Removed security_t:security load_policy access from macro; only load_policy_t needs this.

./domains/programs/checkpolicy.te (new)
1. added types checkpolicy_t and checkpolicy_exec_t
2. added checkpolicy rules

./domains/programs/load_policy.te (new)
1. added types load_policy_t and load_policy_exec_t
2. added load_policy rules

changes to filecontexts:
1. added checkpolicy.fc (new)
2. added load_policy.fc (new)
3. within types.fc, added labels for following:
/etc/security/selinux/src/ /etc/security/default_context

./Makefile
0. Did nothing with initrd stuff!
1. Fixed policy.conf target to make tmp a dependent target.
2. Install target invokes checkpolicy directly, and puts the results in the install dir (without gzip).
3. New install-src target added to install policy source directory

Quoted 10 lines

Needed:
1. A new system installation procedure is probably needed to include make install-src on initial system build.

2. zlib library built into checkpolicy

3. -o -g -m options in checkpolicy?

new/Makefile renamed from Makefile +18 -4
diff -ruN ./Makefile ../new/Makefile
@@ -24,6 +24,8 @@
 INSTALLDIR = /etc/security/selinux
 LOADPATH = $(INSTALLDIR)/$(POLICYVER)
 INITRDLOADPATH = $(INSTALLDIR)/initrd-$(POLICYVER)
+SRCINSTALLDIR = $(INSTALLDIR)/src
+POLICYCONF = $(SRCINSTALLDIR)/policy.conf
 
 POLICYFILES = $(addprefix /usr/local/selinux/flask/,security_classes initial_sids access_vectors)
 ifeq ($(MLS),y)
@@ -57,14 +59,22 @@
 install: $(LOADPATH)
 
 install-initrd: $(INITRDLOADPATH)
-
-$(LOADPATH): $(POLICYVER)
+	
+$(LOADPATH):  $(POLICYCONF) $(CHECKPOLICY)
 	mkdir -p $(INSTALLDIR)
-	install -m 644 -o root -g root $(POLICYVER) $(LOADPATH)
+	$(CHECKPOLICY) -o $@ $(POLICYCONF)
+# Note: Can't use install, so not sure how to deal with mode, user, and group
+#	other than by default.
 
 $(INITRDLOADPATH): initrd-$(POLICYVER)
 	mkdir -p $(INSTALLDIR)
 	install -m 644 -o root -g root initrd-$(POLICYVER) $(INITRDLOADPATH)
+	
+$(POLICYCONF): policy.conf $(SRCINSTALLDIR)
+	install -m 644 -o root -g root policy.conf $@
+	
+$(SRCINSTALLDIR):
+	mkdir -p  $@ 
 
 reload tmp/load: $(LOADPATH)
 	$(BINDIR)/load_policy $(LOADPATH)
@@ -72,8 +82,12 @@
 
 load: tmp/load
 
-policy.conf: $(POLICYFILES) 
+policy.conf: tmp $(POLICYFILES) 
 	m4 -Imacros -s $(POLICYFILES) > policy.conf
+	
+install-src: 
+	mkdir -p $(SRCINSTALLDIR)/policy
+	cp -R . $(SRCINSTALLDIR)/policy
 
 initrd-policy.conf: $(INITRDPOLICYFILES) 
 	m4 -Imacros -s $(INITRDPOLICYFILES) > initrd-policy.conf
new/attrib.te renamed from attrib.te +9 -0
diff -ruN ./attrib.te ../new/attrib.te
@@ -211,3 +211,12 @@
 # traffic sent to or received from the node.
 attribute node_type;
 
+
+##############################
+# Attributes for security policy types:
+#
+
+# The login_contexts attribute idenitifies the files used
+# to define default contexts for login types (e.g., login, cron).
+attribute login_contexts;
+
new/domains/program/checkpolicy.te renamed from domains/program/checkpolicy.te +57 -0

57 lines not on this page · raw message

new/domains/program/crond.te renamed from domains/program/crond.te +1 -1
diff -ruN ./domains/program/crond.te ../new/domains/program/crond.te
@@ -29,7 +29,7 @@
 type anacron_exec_t, file_type, sysadmfile, exec_type;
 
 # Type for the /etc/security/cron_context file.
-type cron_context_t, file_type, sysadmfile;
+type cron_context_t, file_type, sysadmfile, login_contexts;
 
 # Type for temporary files.
 type crond_tmp_t, file_type, sysadmfile, tmpfile;
new/domains/program/load_policy.te renamed from domains/program/load_policy.te +48 -0

48 lines not on this page · raw message

new/domains/program/login.te renamed from domains/program/login.te +7 -0
diff -ruN ./domains/program/login.te ../new/domains/program/login.te
@@ -92,6 +92,9 @@
 allow local_login_t var_run_t:dir rw_dir_perms;
 allow local_login_t var_run_t:file create_file_perms;
 
+# allow read access to default_contexts in /etc/security
+allow local_login_t default_context_t:file r_file_perms;
+
 
 #################################
 #
@@ -142,3 +145,7 @@
 ifdef(`rlogind.te',
 `allow remote_login_t rlogind_devpts_t:chr_file { relabelfrom relabelto };')
 allow remote_login_t ptyfile:chr_file { getattr relabelfrom relabelto };
+
+# allow read access to default_context in /etc/security
+allow remote_login_t default_context_t:file r_file_perms;
+
new/domains/program/sshd.te renamed from domains/program/sshd.te +6 -0
diff -ruN ./domains/program/sshd.te ../new/domains/program/sshd.te
@@ -131,3 +131,9 @@
 allow sshd_t mail_spool_t:dir search;
 allow sshd_t mail_spool_t:lnk_file read;
 allow sshd_t mail_spool_t:file getattr;
+
+
+# Allow read access to login context
+allow sshd_login_t default_context_t:file r_file_perms;
+allow sshd_t default_context_t:file r_file_perms;
+
new/file_contexts/program/checkpolicy.fc renamed from file_contexts/program/checkpolicy.fc +3 -0
diff -ruN ./file_contexts/program/checkpolicy.fc ../new/file_contexts/program/checkpolicy.fc
@@ -0,0 +1,3 @@
+# checkpolicy
+/usr/local/selinux/bin/checkpolicy	system_u:object_r:checkpolicy_exec_t
+/usr/local/bin/checkpolicy		system_u:object_r:checkpolicy_exec_t
new/file_contexts/program/load_policy.fc renamed from file_contexts/program/load_policy.fc +3 -0
diff -ruN ./file_contexts/program/load_policy.fc ../new/file_contexts/program/load_policy.fc
@@ -0,0 +1,3 @@
+# load_policy
+/usr/local/selinux/bin/load_policy	system_u:object_r:load_policy_exec_t
+/usr/local/bin/load_policy		system_u:object_r:load_policy_exec_t
new/file_contexts/types.fc renamed from file_contexts/types.fc +2 -0
diff -ruN ./file_contexts/types.fc ../new/file_contexts/types.fc
@@ -144,6 +144,8 @@
 /etc/mrtg(/.*)?			system_u:object_r:etc_mrtg_t
 /etc/selinux(/.*)?		system_u:object_r:policy_src_t
 /etc/security/selinux(/.*)?	system_u:object_r:policy_config_t	
+/etc/security/selinux/src(|/.*)	system_u:object_r:policy_src_t
+/etc/security/default_context.*	system_u:object_r:default_context_t
 
 #
 # /lib
new/macros/admin_macros.te renamed from macros/admin_macros.te +7 -2
diff -ruN ./macros/admin_macros.te ../new/macros/admin_macros.te
@@ -63,8 +63,13 @@
 # Run admin programs that require different permissions in their own domain.
 # These rules were moved into the appropriate program domain file.
 
-# Reload the policy configuration.
-allow $1_t security_t:security load_policy;
+# added by [email protected]
+# The following rules are temporary until such time that a complete
+# policy management infrastructure is in place so that an administrator
+# cannot directly manipulate policy files with arbitrary programs.
+#
+allow $1_t policy_src_t:notdevfile_class_set create_file_perms;
+allow $1_t policy_src_t:dir create_dir_perms;
 
 # Relabel all files.
 allow $1_t file_type:dir { getattr read search relabelfrom relabelto };
new/types/security.te renamed from types/security.te +8 -2
diff -ruN ./types/security.te ../new/types/security.te
@@ -21,13 +21,19 @@
 # policy_config_t is the type of /ss_policy,
 # the security server policy configuration.
 #
-type policy_config_t, file_type, sysadmfile;
+type policy_config_t, file_type;
 
 #
 # policy_src_t is the type of the policy source
 # files.
 #
-type policy_src_t, file_type, sysadmfile;
+type policy_src_t, file_type;
+
+#
+# default_context_t is the type applied to 
+# /etc/security/default_context
+#
+type default_context_t, file_type, sysadmfile, login_contexts;
 
 #
 # file_labels_t is the type of the persistent
#7 lore raw
Quoted 3 lines · Frank Mayer

It's been pointed out to me that I mistakenly posted the original proposed policy patch rather than the updated version. I've (hopefully) attached the correct patch file here. Sorry for the mix up!

This patch has been committed to the sourceforge CVS tree, with a few revisions. The installation procedure has also been updated to install the policy sources via the new install-src target.

--
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.