[Pkg-shadow-commits] r792 - trunk/debian/patches

Alexander Gattin xrgtn-guest at costa.debian.org
Sat Jan 14 23:42:36 UTC 2006


Author: xrgtn-guest
Date: 2006-01-14 23:42:36 +0000 (Sat, 14 Jan 2006)
New Revision: 792

Modified:
   trunk/debian/patches/484_su-p_preserve_PATH
Log:
fix shelle() protoype; make shelle() always set errno before returning

Modified: trunk/debian/patches/484_su-p_preserve_PATH
===================================================================
--- trunk/debian/patches/484_su-p_preserve_PATH	2006-01-14 23:20:15 UTC (rev 791)
+++ trunk/debian/patches/484_su-p_preserve_PATH	2006-01-14 23:42:36 UTC (rev 792)
@@ -15,8 +15,8 @@
 
 Index: shadow-4.0.14/src/su.c
 ===================================================================
---- shadow-4.0.14.orig/src/su.c	2006-01-15 00:17:57.000000000 +0200
-+++ shadow-4.0.14/src/su.c	2006-01-15 01:18:24.000000000 +0200
+--- shadow-4.0.14.orig/src/su.c	2006-01-15 01:30:46.000000000 +0200
++++ shadow-4.0.14/src/su.c	2006-01-15 01:30:46.000000000 +0200
 @@ -174,7 +174,8 @@
   * have been applied.  Some work was needed to get it integrated into
   * su.c from shadow.
@@ -79,20 +79,20 @@
  	exit (1);
 Index: shadow-4.0.14/lib/prototypes.h
 ===================================================================
---- shadow-4.0.14.orig/lib/prototypes.h	2006-01-15 00:32:57.000000000 +0200
-+++ shadow-4.0.14/lib/prototypes.h	2006-01-15 00:33:28.000000000 +0200
+--- shadow-4.0.14.orig/lib/prototypes.h	2006-01-03 01:51:44.000000000 +0200
++++ shadow-4.0.14/lib/prototypes.h	2006-01-15 01:37:15.000000000 +0200
 @@ -150,6 +150,7 @@
  
  /* shell.c */
  extern void shell (const char *, const char *);
-+extern void shelle (const char *, const char *, const char *);
++extern int shelle (const char *, const char *, const char *);
  
  /* strtoday.c */
  extern long strtoday (const char *);
 Index: shadow-4.0.14/libmisc/shell.c
 ===================================================================
 --- shadow-4.0.14.orig/libmisc/shell.c	2005-08-31 20:24:58.000000000 +0300
-+++ shadow-4.0.14/libmisc/shell.c	2006-01-15 00:46:08.000000000 +0200
++++ shadow-4.0.14/libmisc/shell.c	2006-01-15 01:40:45.000000000 +0200
 @@ -38,8 +38,15 @@
  extern char **newenvp;
  extern size_t newenvc;
@@ -110,7 +110,7 @@
   *
   *	shell begins by trying to figure out what argv[0] is going to
   *	be for the named process.  The user may pass in that argument,
-@@ -51,13 +58,13 @@
+@@ -51,13 +58,15 @@
   *	the file.  If all that fails, give up in disgust ...
   */
  
@@ -120,13 +120,16 @@
  	char arg0[1024];
  	int err;
  
- 	if (file == (char *) 0)
+-	if (file == (char *) 0)
 -		exit (1);
-+		return -1;
++	if (file == (char *) 0) {
++		errno = EINVAL
++		return errno;
++	}
  
  	/*
  	 * The argv[0]'th entry is usually the path name, but
-@@ -80,7 +87,7 @@
+@@ -80,7 +89,7 @@
  	 * grief.
  	 */
  
@@ -135,7 +138,7 @@
  	err = errno;
  
  	/* Linux handles #! in the kernel, and bash doesn't make
-@@ -100,7 +107,7 @@
+@@ -100,7 +109,7 @@
  			if (getc (fp) == '#' && getc (fp) == '!') {
  				fclose (fp);
  				execle ("/bin/sh", "sh",
@@ -144,7 +147,7 @@
  				err = errno;
  			} else {
  				fclose (fp);
-@@ -118,5 +125,5 @@
+@@ -118,5 +127,5 @@
  	snprintf (arg0, sizeof arg0, _("Cannot execute %s"), file);
  	errno = err;
  	perror (arg0);




More information about the Pkg-shadow-commits mailing list