Permalink
Browse files

OS-2215 curl uses LD_LIBRARY_PATH to the proto area

  • Loading branch information...
rmustacc committed May 11, 2013
1 parent b8716d2 commit 273199e3a20014d1cacef1551f4f3e915f410c2e
Showing with 48 additions and 0 deletions.
  1. +48 −0 curl/Patches/libpath.patch
View
@@ -0,0 +1,48 @@
+From 40c9d98a0ae0519770debcd3c28ee22e1680bca7 Mon Sep 17 00:00:00 2001
+From: Robert Mustacchi <rm@joyent.com>
+Date: Fri, 10 May 2013 23:16:53 +0000
+Subject: [PATCH] curl should not set the library path for openssl
+
+As part of curl's autoconfiguration shenanigans it ends up setting
+LD_LIBRARY_PATH into our proto area! This is for future software which means it
+is using our new libc which is definitely not the same as our old libc and thus
+may misinterpret everything from the kernel.
+---
+ configure | 5 +----
+ configure.ac | 4 +---
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/configure b/configure
+index 7643df3..da535cf 100755
+--- a/configure
++++ b/configure
+@@ -21105,10 +21105,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$OPENSSL_ENABLED" = "1"; then
+ if test -n "$LIB_OPENSSL"; then
+ if test "x$cross_compiling" != "xyes"; then
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+- export LD_LIBRARY_PATH
+- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
+-$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
++ /bin/true
+ fi
+ fi
+
+diff --git a/configure.ac b/configure.ac
+index ec07887..e18195b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1639,9 +1639,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
+ dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
+ dnl to prevent further configure tests to fail due to this
+ if test "x$cross_compiling" != "xyes"; then
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+- export LD_LIBRARY_PATH
+- AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
++ /bin/true
+ fi
+ fi
+ CURL_CHECK_OPENSSL_API
+--
+1.7.3.4
+

0 comments on commit 273199e

Please sign in to comment.