/[pkg-java]/trunk/commons-daemon/debian/patches/01_invalid_execve_usage.patch
ViewVC logotype

Contents of /trunk/commons-daemon/debian/patches/01_invalid_execve_usage.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1299 - (show annotations) (download)
Sun Sep 11 11:33:00 2005 UTC (7 years, 8 months ago) by wbaer-guest
File size: 1135 byte(s)
commons-daemon (1.0.1-1) unstable; urgency=low

  * New upstream release
  * Patch from upstream CVS to fix invalid execve() usage (closes: #314937)
  * libant1.6-java to ant transition (closes: #326436)
  * Added autotools-dev to let cdbs update the config.guess/sub
  * Standards-Version 3.6.2 (no changes)
1 --- src/native/unix/native/jsvc-unix.c 2005/08/15 11:19:48 232794
2 +++ src/native/unix/native/jsvc-unix.c 2005/08/15 17:44:02 232839
3 @@ -631,8 +631,9 @@
4 if (strcmp(argv[0],args->procname)!=0) {
5 char *oldpath=getenv("LD_LIBRARY_PATH");
6 char *libf=java_library(args,data);
7 - char *old=argv[0];
8 + char *filename;
9 char buf[2048];
10 + int ret;
11 char *tmp=NULL;
12 char *p1=NULL;
13 char *p2=NULL;
14 @@ -653,9 +654,18 @@
15
16 log_debug("Invoking w/ LD_LIBRARY_PATH=%s",getenv("LD_LIBRARY_PATH"));
17
18 + /* execve needs a full path */
19 + ret = readlink("/proc/self/exe",buf,sizeof(buf)-1);
20 + if (ret<=0)
21 + strcpy(buf,argv[0]);
22 + else
23 + buf[ret]='\0';
24 +
25 + filename=buf;
26 +
27 argv[0]=args->procname;
28 - execve(old,argv,environ);
29 - log_error("Cannot execute JSVC executor process");
30 + execve(filename,argv,environ);
31 + log_error("Cannot execute JSVC executor process (%s)",filename);
32 return(1);
33 }
34 log_debug("Running w/ LD_LIBRARY_PATH=%s",getenv("LD_LIBRARY_PATH"));

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5