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

Alexander Gattin xrgtn-guest at costa.debian.org
Mon Jan 16 01:34:33 UTC 2006


Author: xrgtn-guest
Date: 2006-01-16 01:34:33 +0000 (Mon, 16 Jan 2006)
New Revision: 812

Modified:
   trunk/debian/patches/485_shelle-exitcodes
Log:
do not need to explicitly cast pointer to const, as now right pointer type is used for envp in shelle()/run_shell()

Modified: trunk/debian/patches/485_shelle-exitcodes
===================================================================
--- trunk/debian/patches/485_shelle-exitcodes	2006-01-16 01:27:51 UTC (rev 811)
+++ trunk/debian/patches/485_shelle-exitcodes	2006-01-16 01:34:33 UTC (rev 812)
@@ -4,8 +4,8 @@
 
 Index: shadow-4.0.14/src/sulogin.c
 ===================================================================
---- shadow-4.0.14.orig/src/sulogin.c	2006-01-16 02:10:13.000000000 +0200
-+++ shadow-4.0.14/src/sulogin.c	2006-01-16 02:47:58.000000000 +0200
+--- shadow-4.0.14.orig/src/sulogin.c	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/src/sulogin.c	2006-01-16 03:28:35.000000000 +0200
 @@ -39,6 +39,7 @@
  #include "getdef.h"
  #include "prototypes.h"
@@ -29,14 +29,14 @@
 -	shell (pwent.pw_shell, (char *) 0);	/* exec the shell finally. */
 -	 /*NOTREACHED*/ return (0);
 +	/* exec the shell finally. */
-+	err = shelle (pwent.pw_shell, (char *) 0, (const char *) environ);
++	err = shelle (pwent.pw_shell, (char *) 0, environ);
 +	exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
 +	/*NOTREACHED*/ return (0);
  }
 Index: shadow-4.0.14/lib/exitcodes.h
 ===================================================================
---- shadow-4.0.14.orig/lib/exitcodes.h	2006-01-16 02:10:13.000000000 +0200
-+++ shadow-4.0.14/lib/exitcodes.h	2006-01-16 02:25:24.000000000 +0200
+--- shadow-4.0.14.orig/lib/exitcodes.h	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/lib/exitcodes.h	2006-01-16 03:28:12.000000000 +0200
 @@ -11,3 +11,5 @@
  #define E_SHADOW_NOTFOUND	15	/* not found shadow password file */
  #define E_GROUP_NOTFOUND	16	/* not found group file */
@@ -45,8 +45,8 @@
 +#define E_CMD_NOTFOUND		127	/* can't find command/shell to run */
 Index: shadow-4.0.14/src/login.c
 ===================================================================
---- shadow-4.0.14.orig/src/login.c	2006-01-16 02:25:19.000000000 +0200
-+++ shadow-4.0.14/src/login.c	2006-01-16 02:44:59.000000000 +0200
+--- shadow-4.0.14.orig/src/login.c	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/src/login.c	2006-01-16 03:29:25.000000000 +0200
 @@ -47,6 +47,7 @@
  #include "getdef.h"
  #include "prototypes.h"
@@ -63,7 +63,7 @@
  	const char *cp;
  	char *tmp;
  	char fromhost[512];
-@@ -1151,10 +1153,14 @@
+@@ -1151,10 +1153,12 @@
  		SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
  #endif
  	closelog ();
@@ -72,20 +72,18 @@
 -	}
 -	shell (pwent.pw_shell, (char *) 0);	/* exec the shell finally. */
 +	if ((tmp = getdef_str ("FAKE_SHELL")) != NULL)
-+		/* fake shell */
-+		err = shelle (tmp, pwent.pw_shell, (const char *) newenvp);
++		err = shelle (tmp, pwent.pw_shell, newenvp); /* fake shell */
 +	else
 +		/* exec the shell finally */
-+		err = shelle (pwent.pw_shell, (char *) 0,
-+			      (const char *) newenvp);
++		err = shelle (pwent.pw_shell, (char *) 0, newenvp);
 +	exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
  	/* NOT REACHED */
  	return 0;
  }
 Index: shadow-4.0.14/src/newgrp.c
 ===================================================================
---- shadow-4.0.14.orig/src/newgrp.c	2006-01-16 02:10:13.000000000 +0200
-+++ shadow-4.0.14/src/newgrp.c	2006-01-16 02:49:32.000000000 +0200
+--- shadow-4.0.14.orig/src/newgrp.c	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/src/newgrp.c	2006-01-16 03:29:52.000000000 +0200
 @@ -38,9 +38,11 @@
  #include "defines.h"
  #include "getdef.h"
@@ -127,15 +125,15 @@
  	 * the previous environment which should be the user's login shell.
  	 */
 -	shell (prog, initflag ? (char *) 0 : cp);
-+	err = shelle (prog, initflag ? (char *) 0 : cp, (const char *) newenvp);
++	err = shelle (prog, initflag ? (char *) 0 : cp, newenvp);
 +	exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
  	/* NOTREACHED */
        failure:
  
 Index: shadow-4.0.14/src/su.c
 ===================================================================
---- shadow-4.0.14.orig/src/su.c	2006-01-16 02:25:24.000000000 +0200
-+++ shadow-4.0.14/src/su.c	2006-01-16 02:49:03.000000000 +0200
+--- shadow-4.0.14.orig/src/su.c	2006-01-16 03:23:07.000000000 +0200
++++ shadow-4.0.14/src/su.c	2006-01-16 03:30:33.000000000 +0200
 @@ -187,14 +187,10 @@
  		pam_end (pamh, PAM_SUCCESS);
  
@@ -162,13 +160,11 @@
  
  #ifdef USE_PAM
  	int ret;
-@@ -906,22 +902,22 @@
- 		 */
+@@ -907,19 +903,19 @@
  		argv[-1] = cp;
  #ifndef USE_PAM
--		(void) execve (shellstr, &argv[-1], environ);
+ 		(void) execve (shellstr, &argv[-1], environ);
 -		exit_status = errno == ENOENT ? 127 : 126;
-+		(void) execve (shellstr, &argv[-1], (const char *) environ);
 +		err = errno;
  		(void) fprintf (stderr, _("No shell\n"));
  		SYSLOG ((LOG_WARN, "Cannot execute %s", shellstr));
@@ -177,7 +173,7 @@
 +		exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
  #else
 -		run_shell (shellstr, &argv[-1], 0, environ); /* no return */
-+		run_shell (shellstr, &argv[-1], 0, (const char *) environ);
++		run_shell (shellstr, &argv[-1], 0, environ);
 +		/* no return */
  #endif
  	}
@@ -185,18 +181,15 @@
 -	exit_status = shelle (shellstr, cp, environ);
 -	exit_status = exit_status == ENOENT ? 127 : 126;
 -	exit (exit_status);
-+	err = shelle (shellstr, cp, (const char *) environ);
++	err = shelle (shellstr, cp, environ);
 +	exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
  #else
--	run_shell (shellstr, &cp, 1, environ);
-+	run_shell (shellstr, &cp, 1, (const char *) environ);
+ 	run_shell (shellstr, &cp, 1, environ);
  #endif
- 	/* NOT REACHED */
- 	exit (1);
 Index: shadow-4.0.14/libmisc/age.c
 ===================================================================
---- shadow-4.0.14.orig/libmisc/age.c	2006-01-16 02:10:13.000000000 +0200
-+++ shadow-4.0.14/libmisc/age.c	2006-01-16 02:25:24.000000000 +0200
+--- shadow-4.0.14.orig/libmisc/age.c	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/libmisc/age.c	2006-01-16 03:28:12.000000000 +0200
 @@ -35,6 +35,7 @@
  #include <errno.h>
  #include "prototypes.h"
@@ -216,8 +209,8 @@
  		exit (1);
 Index: shadow-4.0.14/src/userdel.c
 ===================================================================
---- shadow-4.0.14.orig/src/userdel.c	2006-01-16 02:25:23.000000000 +0200
-+++ shadow-4.0.14/src/userdel.c	2006-01-16 02:45:26.000000000 +0200
+--- shadow-4.0.14.orig/src/userdel.c	2006-01-16 03:17:34.000000000 +0200
++++ shadow-4.0.14/src/userdel.c	2006-01-16 03:28:12.000000000 +0200
 @@ -51,6 +51,7 @@
  #include "pwauth.h"
  #include "pwio.h"




More information about the Pkg-shadow-commits mailing list