Skip to contentSkip to conversation

openssl-native: disable execstack flag to prevent problems with SELinux [v2]

PATCH New Paul Eggleton 2 participants 2 messages Dec 7, 2010

lore
Share & tools
lore
#0 lore raw

cover openssl-native: disable execstack flag to prevent problems with SELinux [v2]

This new version of the patch only applies the fix to native. We can deal with the issue of SELinux on the target if it comes up in future.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: paule/fixes
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/fixes

Thanks,
Paul Eggleton <[email protected]>
---

Paul Eggleton (1):
openssl-native: disable execstack flag to prevent problems with
SELinux

 meta/recipes-connectivity/openssl/openssl.inc      |    4 ++++
 .../recipes-connectivity/openssl/openssl_0.9.8p.bb |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/1 openssl-native: disable execstack flag to prevent problems with SELinux

The execstack flag gets set on libcrypto.so by default which causes SELinux to prevent it from being loaded on systems using SELinux, which includes Fedora. This patch disables the execstack flag. (Note: Red Hat do this in their openssl packaging.)

---
 meta/recipes-connectivity/openssl/openssl.inc      |    4 ++++
 .../recipes-connectivity/openssl/openssl_0.9.8p.bb |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +4 -0
index da90456..f054c26 100644
@@ -17,6 +17,10 @@ AR_append = " r"
 CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
 	-DTERMIO ${FULL_OPTIMIZATION} -Wall"
 
+# Avoid binaries being marked as requiring an executable stack (which causes 
+# issues with SELinux on the host)
+CFLAG_append_virtclass-native = " -Wa,--noexecstack"
+
 # -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
 CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
 CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
meta/recipes-connectivity/openssl/openssl_0.9.8p.bb +1 -1
index 3949540..fe02272 100644
@@ -1,6 +1,6 @@
 require openssl.inc
 
-PR = "r0"
+PR = "r1"
 SRC_URI += "file://debian/ca.patch \
             file://debian/config-hurd.patch;apply=no \
             file://debian/debian-targets.patch \
Signature · 12 lines
1.7.1

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.