[Pkg-sysvinit-commits] r1437 - in sysvinit/trunk/debian: . patches

Kel Modderman kelmo-guest at alioth.debian.org
Sat Jul 11 07:57:36 UTC 2009


Author: kelmo-guest
Date: 2009-07-11 07:57:35 +0000 (Sat, 11 Jul 2009)
New Revision: 1437

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/patches/85_killall_safecwd.dpatch
Log:
Modify debian/patches/85_killall_safecwd.dpatch to make sure /proc
is CWD when killall5 is called as pidof as well. (Closes: #536543)

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2009-07-11 07:29:01 UTC (rev 1436)
+++ sysvinit/trunk/debian/changelog	2009-07-11 07:57:35 UTC (rev 1437)
@@ -2,8 +2,10 @@
 
   * Patch debian/startpar/startpar.c to enable workaround for missing
     /dev/pts in early runlevel S when using CONCURRENCY=startpar.
+  * Modify debian/patches/85_killall_safecwd.dpatch to make sure /proc
+    is CWD when killall5 is called as pidof as well. (Closes: #536543)
 
- -- Kel Modderman <kel at otaku42.de>  Sat, 11 Jul 2009 03:21:10 +1000
+ -- Kel Modderman <kel at otaku42.de>  Sat, 11 Jul 2009 17:57:05 +1000
 
 sysvinit (2.86.ds1-64) unstable; urgency=low
 

Modified: sysvinit/trunk/debian/patches/85_killall_safecwd.dpatch
===================================================================
--- sysvinit/trunk/debian/patches/85_killall_safecwd.dpatch	2009-07-11 07:29:01 UTC (rev 1436)
+++ sysvinit/trunk/debian/patches/85_killall_safecwd.dpatch	2009-07-11 07:57:35 UTC (rev 1437)
@@ -11,9 +11,9 @@
 Status wrt upstream: Should be sent upstream.  Not done yet.
 
 @DPATCH@
-diff -urNad sysvinit-2.86.ds1~/src/killall5.c sysvinit-2.86.ds1/src/killall5.c
---- sysvinit-2.86.ds1~/src/killall5.c	2008-05-26 16:07:00.309320829 +0200
-+++ sysvinit-2.86.ds1/src/killall5.c	2008-05-26 16:07:00.585275811 +0200
+diff -urNad sysvinit~/src/killall5.c sysvinit/src/killall5.c
+--- sysvinit~/src/killall5.c	2009-07-11 17:49:04.000000000 +1000
++++ sysvinit/src/killall5.c	2009-07-11 17:49:18.000000000 +1000
 @@ -168,6 +168,7 @@
  
  /*
@@ -22,16 +22,20 @@
   */
  int readproc(int do_stat)
  {
-@@ -183,7 +184,7 @@
+@@ -183,7 +184,11 @@
  	int		pid, f;
  
  	/* Open the /proc directory. */
 -	if ((dir = opendir("/proc")) == NULL) {
++	if (chdir("/proc") == -1) {
++		nsyslog(LOG_ERR, "chdir /proc failed");
++		return -1;
++	}
 +	if ((dir = opendir(".")) == NULL) {
  		nsyslog(LOG_ERR, "cannot opendir(/proc)");
  		return -1;
  	}
-@@ -209,10 +210,10 @@
+@@ -209,10 +214,10 @@
  		memset(p, 0, sizeof(PROC));
  
  		/* Open the status file. */
@@ -44,7 +48,7 @@
  			buf[0] = 0;
  			fgets(buf, sizeof(buf), fp);
  
-@@ -226,7 +227,7 @@
+@@ -226,7 +231,7 @@
  				if (q == NULL) {
  					p->sid = 0;
  					nsyslog(LOG_ERR,
@@ -53,7 +57,7 @@
  						path);
  					free(p);
  					continue;
-@@ -263,7 +264,7 @@
+@@ -263,7 +268,7 @@
  			continue;
  		}
  
@@ -62,14 +66,3 @@
  		if ((fp = fopen(path, "r")) != NULL) {
  
  			/* Now read argv[0] */
-@@ -646,6 +647,10 @@
- 
- 	/* First get the /proc filesystem online. */
- 	mount_proc();
-+	if (chdir("/proc") == -1) {
-+		nsyslog(LOG_ERR, "chdir /proc failed");
-+		return(1);
-+	}
- 
- 	/*
- 	 *	Ignoring SIGKILL and SIGSTOP do not make sense, but




More information about the Pkg-sysvinit-commits mailing list