Skip to contentSkip to conversation

patch: correct default policy type

PATCH Timothy Wood 2 participants 2 messages Sep 23, 2004 – Oct 4, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've noticed that the release on the NSA site installs the policy into /etc/selinux/strict but libselinux looks for a targeted policy by default. Attached patch changes the default in libselinux to be strict. ~ Please apply.

Timothy,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBUuoKPT0XLCkCs2ARAmXpAJ4hg5OHoSgSgLl10UjC2kG1SOl9ewCeLgT2 66+gfzjqam3uqTjx81YyPWo=
=yS7Z
-----END PGP SIGNATURE-----

selinux_config.c +1 -1
@@ -7,7 +7,7 @@
 
 #define SELINUXDIR "/etc/selinux/"
 #define SELINUXCONFIG SELINUXDIR "config"
-#define SELINUXDEFAULT "targeted"
+#define SELINUXDEFAULT "strict"
 #define SELINUXTYPETAG "SELINUXTYPE="
 #define SELINUXTAG "SELINUX="
 
#1 lore raw
Quoted 4 lines · Timothy Wood

I've noticed that the release on the NSA site installs the policy into /etc/selinux/strict but libselinux looks for a targeted policy by default. Attached patch changes the default in libselinux to be strict. ~ Please apply.

The original support for multiple policies came from the introduction of the targeted policy in Fedora, and targeted policy is the default in Fedora. Changing the libselinux default to strict could have implications for Fedora. As long as /etc/selinux/config exists, is readable and contains a SELINUXTYPE= entry, there would be no problem, but I'm hesitant to make this change without further consideration. Note that the /etc/selinux/config file is created by the spec file.

I think I'd prefer to just make libselinux a bit smarter, e.g. if /etc/selinux/config doesn't exist, we could probe for the existence of strict or targeted subdirectories under /etc/selinux. Of course, both policies could be installed, in which case we would still need a default choice. And I think Russell's Debian setup just places the policy directly under /etc/selinux without a separate subdirectory, so that could be a problem.

Signature · 8 lines
Stephen Smalley <[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.