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

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