[apache-commons-daemon/f14/master] Fix bug 669259 (execve warning segfault)

Stanislav Ochotnicky sochotni at fedoraproject.org
Tue Feb 1 17:27:03 UTC 2011


commit 24ae88ffcb4dad95cea466d53f32d4718de01745
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Tue Feb 1 17:49:31 2011 +0100

    Fix bug 669259 (execve warning segfault)

 apache-commons-daemon-execve-path-warning.patch |   20 +++++++++-----------
 apache-commons-daemon.spec                      |    5 ++++-
 2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/apache-commons-daemon-execve-path-warning.patch b/apache-commons-daemon-execve-path-warning.patch
index f41d726..52fada0 100644
--- a/apache-commons-daemon-execve-path-warning.patch
+++ b/apache-commons-daemon-execve-path-warning.patch
@@ -1,33 +1,31 @@
-From f1a95250e28d69acf85819ad8a792c39f8b0d393 Mon Sep 17 00:00:00 2001
+From 94578ce4b228417c8130690128cdbdab90cc04d9 Mon Sep 17 00:00:00 2001
 From: Stanislav Ochotnicky <sochotnicky at 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)
+Date: Tue, 1 Feb 2011 18:19:33 +0100
+Subject: [PATCH] execve path warning
 
 ---
- src/native/unix/native/jsvc-unix.c |   10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
+ src/native/unix/native/jsvc-unix.c |    8 ++++++++
+ 1 files changed, 8 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
+index 6f39365..ccd5d99 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[]) {
+@@ -702,6 +702,14 @@ 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) {
++        if (strchr(argv[0],'/') == 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
+1.7.3.5
 
diff --git a/apache-commons-daemon.spec b/apache-commons-daemon.spec
index d1d512f..fc13506 100644
--- a/apache-commons-daemon.spec
+++ b/apache-commons-daemon.spec
@@ -4,7 +4,7 @@
 
 Name:           apache-%{short_name}
 Version:        1.0.2
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Defines API to support an alternative invocation mechanism
 License:        ASL 2.0
 Group:          Applications/System
@@ -166,6 +166,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Feb  1 2011 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1.0.2-5
+- Fix bug 669259 (execve warning segfault)
+
 * Thu Jul  8 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1.0.2-4
 - Add license to javadoc subpackage
 


More information about the scm-commits mailing list