34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From f1a95250e28d69acf85819ad8a792c39f8b0d393 Mon Sep 17 00:00:00 2001
|
|
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
|
Date: Tue, 11 May 2010 13:29:15 +0200
|
|
Subject: [PATCH 1/3] Patch to force absolute or relative paths (no PATH searching)
|
|
|
|
---
|
|
src/native/unix/native/jsvc-unix.c | 10 ++++++++++
|
|
1 files changed, 10 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c
|
|
index 6f39365..abbebb7 100644
|
|
--- a/src/native/unix/native/jsvc-unix.c
|
|
+++ b/src/native/unix/native/jsvc-unix.c
|
|
@@ -702,6 +702,16 @@ int main(int argc, char *argv[]) {
|
|
char *p1=NULL;
|
|
char *p2=NULL;
|
|
|
|
+ /* We don't want to use a form of exec() that searches the
|
|
+ PATH, so require that argv[0] be either an absolute or
|
|
+ relative path. Error out if this isn't the case. */
|
|
+ tmp=strchr(oldpath,'/');
|
|
+ if (tmp==NULL) {
|
|
+ log_error("JSVC re-exec requires execution with an absolute or relative path");
|
|
+ return(1);
|
|
+ }
|
|
+
|
|
+
|
|
/*
|
|
* There is no need to change LD_LIBRARY_PATH
|
|
* if we were not able to find a path to libjvm.so
|
|
--
|
|
1.6.6.1
|
|
|