File: CVE-2010-3389--bug598549.patch

package info (click to toggle)
cluster-agents 1%3A1.0.3-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,828 kB
  • sloc: sh: 19,423; ansic: 3,174; perl: 3,135; makefile: 367
file content (53 lines) | stat: -rw-r--r-- 1,922 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 5cdbbe5a5234c1bd26f7fe2a5c59abeb76e6e18c Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Tue, 19 Oct 2010 13:32:54 +0300
Subject: [PATCH] CVE-2010-3389 insecure library loading Bug#598549
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 heartbeat/SAPDatabase |    7 +++++--
 heartbeat/SAPInstance |    7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/heartbeat/SAPDatabase b/heartbeat/SAPDatabase
index 5e07046..e9574ea 100755
--- a/heartbeat/SAPDatabase
+++ b/heartbeat/SAPDatabase
@@ -966,8 +966,11 @@ else
 fi
 
 # as root user we need the library path to the SAP kernel to be able to call executables
-if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
-  LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+if [ "$DIR_EXECUTABLE" ]; then
+  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
+      LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+      export LD_LIBRARY_PATH
+  fi
 fi
 sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
 
diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance
index 08f47f8..d7dea78 100755
--- a/heartbeat/SAPInstance
+++ b/heartbeat/SAPInstance
@@ -296,8 +296,11 @@ sapinstance_init() {
   fi
 
   # as root user we need the library path to the SAP kernel to be able to call sapcontrol
-  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
-    LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+  if [ "$DIR_EXECUTABLE" ]; then
+    if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
+	LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+	export LD_LIBRARY_PATH
+    fi
   fi
 
   sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
-- 
1.7.1