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

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