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

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


Author: xrgtn-guest
Date: 2006-01-16 01:07:41 +0000 (Mon, 16 Jan 2006)
New Revision: 810

Modified:
   trunk/debian/patches/485_shelle-exitcodes
Log:
added one #include, one variable declaration and eliminated warnings, hopefully

Modified: trunk/debian/patches/485_shelle-exitcodes
===================================================================
--- trunk/debian/patches/485_shelle-exitcodes	2006-01-16 00:07:51 UTC (rev 809)
+++ trunk/debian/patches/485_shelle-exitcodes	2006-01-16 01:07:41 UTC (rev 810)
@@ -4,8 +4,8 @@
 
 Index: shadow-4.0.14/src/sulogin.c
 ===================================================================
---- shadow-4.0.14.orig/src/sulogin.c	2005-12-06 23:25:00.000000000 +0200
-+++ shadow-4.0.14/src/sulogin.c	2006-01-15 19:15:58.000000000 +0200
+--- 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
 @@ -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, environ);
++	err = shelle (pwent.pw_shell, (char *) 0, (const char *) 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	2005-08-31 20:36:11.000000000 +0300
-+++ shadow-4.0.14/lib/exitcodes.h	2006-01-15 19:15:58.000000000 +0200
+--- 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
 @@ -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-15 19:15:54.000000000 +0200
-+++ shadow-4.0.14/src/login.c	2006-01-15 19:15:58.000000000 +0200
+--- 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
 @@ -47,6 +47,7 @@
  #include "getdef.h"
  #include "prototypes.h"
@@ -55,7 +55,15 @@
  #ifdef USE_PAM
  #include "pam_defs.h"
  
-@@ -1151,10 +1152,12 @@
+@@ -333,6 +334,7 @@
+ 	int flag;
+ 	int subroot = 0;
+ 	int is_console;
++	int err;
+ 	const char *cp;
+ 	char *tmp;
+ 	char fromhost[512];
+@@ -1151,10 +1153,14 @@
  		SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
  #endif
  	closelog ();
@@ -64,18 +72,20 @@
 -	}
 -	shell (pwent.pw_shell, (char *) 0);	/* exec the shell finally. */
 +	if ((tmp = getdef_str ("FAKE_SHELL")) != NULL)
-+		err = shelle (tmp, pwent.pw_shell, newenvp); /* fake shell */
++		/* fake shell */
++		err = shelle (tmp, pwent.pw_shell, (const char *) newenvp);
 +	else
-+		/* exec the shell finally. */
-+		err = shelle (pwent.pw_shell, (char *) 0, newenvp);
++		/* exec the shell finally */
++		err = shelle (pwent.pw_shell, (char *) 0,
++			      (const char *) 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	2005-12-06 23:25:00.000000000 +0200
-+++ shadow-4.0.14/src/newgrp.c	2006-01-16 02:00:05.000000000 +0200
+--- 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
 @@ -38,9 +38,11 @@
  #include "defines.h"
  #include "getdef.h"
@@ -117,15 +127,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, newenvp);
++	err = shelle (prog, initflag ? (char *) 0 : cp, (const char *) 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-15 19:15:58.000000000 +0200
-+++ shadow-4.0.14/src/su.c	2006-01-15 19:15:58.000000000 +0200
+--- 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
 @@ -187,14 +187,10 @@
  		pam_end (pamh, PAM_SUCCESS);
  
@@ -152,11 +162,13 @@
  
  #ifdef USE_PAM
  	int ret;
-@@ -907,19 +903,18 @@
+@@ -906,22 +902,22 @@
+ 		 */
  		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));
@@ -164,22 +176,27 @@
 -		exit (exit_status);
 +		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, environ); /* no return */
++		run_shell (shellstr, &argv[-1], 0, (const char *) environ);
++		/* no return */
  #endif
  	}
  #ifndef USE_PAM
 -	exit_status = shelle (shellstr, cp, environ);
 -	exit_status = exit_status == ENOENT ? 127 : 126;
 -	exit (exit_status);
-+	err = shelle (shellstr, cp, environ);
++	err = shelle (shellstr, cp, (const char *) environ);
 +	exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
  #else
- 	run_shell (shellstr, &cp, 1, environ);
+-	run_shell (shellstr, &cp, 1, environ);
++	run_shell (shellstr, &cp, 1, (const char *) environ);
  #endif
+ 	/* NOT REACHED */
+ 	exit (1);
 Index: shadow-4.0.14/libmisc/age.c
 ===================================================================
---- shadow-4.0.14.orig/libmisc/age.c	2005-08-31 20:24:57.000000000 +0300
-+++ shadow-4.0.14/libmisc/age.c	2006-01-15 19:15:58.000000000 +0200
+--- 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
 @@ -35,6 +35,7 @@
  #include <errno.h>
  #include "prototypes.h"
@@ -199,9 +216,17 @@
  		exit (1);
 Index: shadow-4.0.14/src/userdel.c
 ===================================================================
---- shadow-4.0.14.orig/src/userdel.c	2006-01-15 19:15:58.000000000 +0200
-+++ shadow-4.0.14/src/userdel.c	2006-01-16 02:01:58.000000000 +0200
-@@ -512,13 +512,8 @@
+--- 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
+@@ -51,6 +51,7 @@
+ #include "pwauth.h"
+ #include "pwio.h"
+ #include "shadowio.h"
++#include "exitcodes.h"
+ #ifdef	SHADOWGRP
+ #include "sgroupio.h"
+ #endif
+@@ -512,13 +513,8 @@
  	pid = fork ();
  	if (pid == 0) {
  		execl (cmd, cmd, user, (char *) 0);




More information about the Pkg-shadow-commits mailing list