rpms/jakarta-commons-daemon/devel jakarta-commons-daemon-execve-path-warning.patch, NONE, 1.1 jakarta-commons-daemon.spec, 1.18, 1.19

Permaine Cheung (pcheung) fedora-extras-commits at redhat.com
Mon Sep 24 13:24:37 UTC 2007


Author: pcheung

Update of /cvs/pkgs/rpms/jakarta-commons-daemon/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24988

Modified Files:
	jakarta-commons-daemon.spec 
Added Files:
	jakarta-commons-daemon-execve-path-warning.patch 
Log Message:
Add execve path warning patch from James Ralston



jakarta-commons-daemon-execve-path-warning.patch:

--- NEW FILE jakarta-commons-daemon-execve-path-warning.patch ---
diff -up daemon-1.0.1/src/native/unix/native/jsvc-unix.c.execve-path-warning daemon-1.0.1/src/native/unix/native/jsvc-unix.c
--- src/native/unix/native/jsvc-unix.c
+++ src/native/unix/native/jsvc-unix.c
@@ -635,6 +635,15 @@ 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(old,'/');
+	if (tmp==NULL) {
+	  log_error("JSVC re-exec requires execution with an absolute or relative path");
+	  return(1);
+	}
+
         p1=strdup(libf);
         tmp=strrchr(p1,'/');
         if (tmp!=NULL) tmp[0]='\0';


Index: jakarta-commons-daemon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/jakarta-commons-daemon/devel/jakarta-commons-daemon.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- jakarta-commons-daemon.spec	19 Sep 2007 22:33:40 -0000	1.18
+++ jakarta-commons-daemon.spec	24 Sep 2007 13:24:05 -0000	1.19
@@ -39,14 +39,15 @@
 
 Name:           jakarta-%{short_name}
 Version:        1.0.1
-Release:        6jpp.3%{?dist}
+Release:        6jpp.4%{?dist}
 Epoch:          1
 Summary:        Defines API to support an alternative invocation mechanism
 License:        ASL 2.0
 Group:          Applications/System
 URL:            http://jakarta.apache.org/commons/daemon/
 Source0:        http://www.apache.org/dist/jakarta/commons/daemon/source/daemon-1.0.1.tar.gz
-Patch:          %{name}-crosslink.patch
+Patch0:          %{name}-crosslink.patch
+Patch1:          %{name}-execve-path-warning.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %if %{native}
@@ -102,6 +103,7 @@
 %prep
 %setup -q -n %{base_name}-%{version}
 %patch0 -p0
+%patch1 -p0
 chmod 644 src/samples/*
 %if %{native}
 pushd src/native/unix
@@ -185,6 +187,9 @@
 %endif
 
 %changelog
+* Mon Sep 24 2007 Permaine Cheung <pcheung at redhat.com> - 1:1.0.1-6jpp.4
+- Add execve path warning patch from James Ralston
+
 * Mon Sep 17 2007 James Ralston <ralston at pobox.com> - 1:1.0.1-6jpp.3
 - update License tag to reflect new acceptable licenses
 - update main Group tag (old value "System/Boot" is invalid)




More information about the fedora-extras-commits mailing list