Description: fix insecure library loading (CVE-2010-3372)
Origin: http://svn.nordugrid.org/trac/nordugrid/changeset/18980
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606151
Forwarded: not-needed
Last-Update: 2010-12-18
--- nordugrid-arc-nox-1.1.0~rc6.orig/src/services/a-rex/a-rex.in
+++ nordugrid-arc-nox-1.1.0~rc6/src/services/a-rex/a-rex.in
@@ -71,10 +71,18 @@
libdir="$location/lib"
libdir64="$location/lib64"
if [ -d "$libdir64" ] ; then
- LD_LIBRARY_PATH="$libdir64:$LD_LIBRARY_PATH"
+ if [ "x$LD_LIBRARY_PATH" = "x" ]; then
+ LD_LIBRARY_PATH="$libdir64"
+ else
+ LD_LIBRARY_PATH="$libdir64:$LD_LIBRARY_PATH"
+ fi
fi
if [ -d "$libdir" ] ; then
- LD_LIBRARY_PATH="$libdir:$LD_LIBRARY_PATH"
+ if [ "x$LD_LIBRARY_PATH" = "x" ]; then
+ LD_LIBRARY_PATH="$libdir"
+ else
+ LD_LIBRARY_PATH="$libdir:$LD_LIBRARY_PATH"
+ fi
fi
fi
fi
@@ -278,7 +286,11 @@
add_library_path "$GRIDSITE_LOCATION"
add_library_path "$VOMS_LOCATION"
add_library_path "$GLOBUS_LOCATION"
-LD_LIBRARY_PATH=$ARC_LOCATION/@libsubdir@:$LD_LIBRARY_PATH
+if [ "x$LD_LIBRARY_PATH" = "x" ]; then
+ LD_LIBRARY_PATH=$ARC_LOCATION/@libsubdir@
+else
+ LD_LIBRARY_PATH=$ARC_LOCATION/@libsubdir@:$LD_LIBRARY_PATH
+fi
SASL_PATH=${SASL_PATH:-$GLOBUS_LOCATION/lib/sasl}
export LD_LIBRARY_PATH SASL_PATH
--- nordugrid-arc-nox-1.1.0~rc6.orig/src/services/a-rex/lrms/submit_common.sh.in
+++ nordugrid-arc-nox-1.1.0~rc6/src/services/a-rex/lrms/submit_common.sh.in
@@ -312,7 +312,11 @@
fi
export GLOBUS_LOCATION
export ARC_LOCATION
- export LD_LIBRARY_PATH="$GLOBUS_LOCATION/lib:$LD_LIBRARY_PATH"
+ if [ "x$LD_LIBRARY_PATH" = "x" ]; then
+ export LD_LIBRARY_PATH="$GLOBUS_LOCATION/lib"
+ else
+ export LD_LIBRARY_PATH="$GLOBUS_LOCATION/lib:$LD_LIBRARY_PATH"
+ fi
export SASL_PATH="$GLOBUS_LOCATION/lib/sasl"
export X509_USER_KEY="${RUNTIME_CONTROL_DIR}/job.local.proxy"
export X509_USER_CERT="${RUNTIME_CONTROL_DIR}/job.local.proxy"