Blame SOURCES/0001-execve-path-warning.patch

e0076e
From 0de57c78cbe1666fdf78ff6522b3b0ce18f12716 Mon Sep 17 00:00:00 2001
e0076e
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
e0076e
Date: Tue, 18 Jan 2011 14:46:21 +0100
e0076e
Subject: [PATCH 1/3] execve path warning
e0076e
e0076e
---
e0076e
 src/native/unix/native/jsvc-unix.c |    9 +++++++++
e0076e
 1 files changed, 9 insertions(+), 0 deletions(-)
e0076e
e0076e
diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c
e0076e
index 1967f09..22967f1 100644
e0076e
--- a/src/native/unix/native/jsvc-unix.c
e0076e
+++ b/src/native/unix/native/jsvc-unix.c
e0076e
@@ -1015,6 +1015,15 @@ int main(int argc, char *argv[])
e0076e
         char *tmp = NULL;
e0076e
         char *p1  = NULL;
e0076e
         char *p2  = NULL;
e0076e
+	
e0076e
+        /* We don't want to use a form of exec() that searches the
e0076e
+           PATH, so require that argv[0] be either an absolute or
e0076e
+           relative path.  Error out if this isn't the case.  */
e0076e
+        if (strchr(argv[0],'/') == NULL) {
e0076e
+          log_error("JSVC re-exec requires execution with an absolute or relative path");
e0076e
+          return(1);
e0076e
+        }
e0076e
+
e0076e
 
e0076e
         /*
e0076e
          * There is no need to change LD_LIBRARY_PATH
e0076e
-- 
e0076e
1.7.6
e0076e