Skip to contentSkip to conversation

Can we make libsemanage default to expand-check=0

PATCH Daniel J Walsh 3 participants 5 messages Aug 5, 2008 – Aug 8, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw
src/semanage.conf +1 -1
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.25/src/semanage.conf
@@ -35,4 +35,4 @@
 # given in <sepol/policydb.h>.  Change this setting if a different
 # version is necessary.
 #policy-version = 19
-
+expand-check=0
#1 lore raw

src/semanage.conf line 38

Quoted 10 lines · Daniel J Walsh

plain text document attachment (libsemanage-rhat.patch)
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.25/src/semanage.conf

src/semanage.conf +1 -1
@@ -35,4 +35,4 @@
 # given in <sepol/policydb.h>.  Change this setting if a different
 # version is necessary.
 #policy-version = 19
-
+expand-check=0

I thought we were going to leave this unchanged upstream, and only make this change in Fedora.

We want the checking to be applied for policy developers. If you were to incorporate 'make validate' into the policy spec file, then you would get it applied when you perform a policy build. And ideally there would be similar support in the selinux-policy-devel Makefile for policy module writers to use. All it does is run semodule_link followed by semodule_expand, which applies the checking.

If we were to change the upstream default, we'd likely change it in the code (semanage_conf_init()) rather than just in the .conf file. And then policy developers would need to add expand-check=1 to their .conf file to set it.

Signature · 8 lines
Stephen Smalley
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
Quoted 15 lines · Stephen Smalley

src/semanage.conf line 38

Quoted 10 lines · Daniel J Walsh

plain text document attachment (libsemanage-rhat.patch)
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.25/src/semanage.conf

src/semanage.conf +1 -1
@@ -35,4 +35,4 @@
 # given in <sepol/policydb.h>.  Change this setting if a different
 # version is necessary.
 #policy-version = 19
-
+expand-check=0

I thought we were going to leave this unchanged upstream, and only make this change in Fedora.

Ok. I was just trying to get rid of my patch.

Quoted 7 lines

We want the checking to be applied for policy developers. If you were to incorporate 'make validate' into the policy spec file, then you would get it applied when you perform a policy build. And ideally there would be similar support in the selinux-policy-devel Makefile for policy module writers to use. All it does is run semodule_link followed by semodule_expand, which applies the checking.

make validate is now in the Rawhide spec file.

Quoted 5 lines

If we were to change the upstream default, we'd likely change it in the code (semanage_conf_init()) rather than just in the .conf file. And then policy developers would need to add expand-check=1 to their .conf file to set it.

Putting this into the selinux-policy-devel package (which does not exist any longer, it is all part of selinux-policy) does not work. Since the semodule_lnk and semodule_expand do not use the installed system. So you would have hack up the Makefile to grab all of the pp files in /etc/selinux/TYPE/modules/active/*.pp and isolate the base.pp file, then add the new pp files that you are creating. Or somehow add this as a parameter to semodule_link to make it happen automatically

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

#3 lore raw
In reply to Daniel J Walsh

Daniel J Walsh wrote:

I'd rather we not do this. We are already losing the vast majority of testers for those codepaths by Fedora turning it off, if it becomes off by default I'm afraid that code will rot like crazy.

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

#4 lore raw

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

Quoted 3 lines · Joshua Brindle

Daniel J Walsh wrote:

I'd rather we not do this. We are already losing the vast majority of testers for those codepaths by Fedora turning it off, if it becomes off by default I'm afraid that code will rot like crazy.

That is fine. The selinux-policy package does do a validate now on build. We need to hack something up though to get this to happen in the makefile in the devel package.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkiciL4ACgkQrlYvE4MpobORlQCg2qK/dOdIKoCJ5XocdCI9qBvc CdkAoLqdTrRGUpeIgLm/51t+K3tv6Dr4
=TPU6
-----END PGP SIGNATURE-----

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