apache-commons-daemon/apache-commons-daemon-execve-path-warning.patch
spike dd810d2441 Updated to 1.0.3
Cleaned up BRs
2010-10-22 03:01:48 +02:00

20 lines
711 B
Diff

--- src/native/unix/native/jsvc-unix.c 2010-10-22 02:39:31.758471743 +0200
+++ src/native/unix/native/jsvc-unix.c 2010-10-22 02:41:27.200469664 +0200
@@ -824,6 +824,16 @@
char *tmp = NULL;
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