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

Christian Perrier bubulle at costa.debian.org
Sun May 7 17:15:21 UTC 2006


Author: bubulle
Date: 2006-05-07 17:15:20 +0000 (Sun, 07 May 2006)
New Revision: 979

Added:
   trunk/debian/patches/323_su_arguments_are_concatenated
Removed:
   trunk/debian/patches/423_su_arguments_are_concatenated
Modified:
   trunk/debian/patches/series
Log:
423_su_arguments_are_concatenated has been applied upstream


Copied: trunk/debian/patches/323_su_arguments_are_concatenated (from rev 976, trunk/debian/patches/423_su_arguments_are_concatenated)
===================================================================
--- trunk/debian/patches/423_su_arguments_are_concatenated	2006-05-05 14:01:14 UTC (rev 976)
+++ trunk/debian/patches/323_su_arguments_are_concatenated	2006-05-07 17:15:20 UTC (rev 979)
@@ -0,0 +1,50 @@
+Goal: Concatenate the non-su arguments and provide them to the shell with
+      the -c option
+Fixes: #317264
+       see also #276419
+
+Status wrt upstream: This is a Debian specific patch. But will be in 4.0.16 (?)
+
+Note: the fix of the man page is still missing.
+      (to be taken from the trunk)
+
+Index: shadow-4.0.15/src/su.c
+===================================================================
+--- shadow-4.0.15.orig/src/su.c	2006-03-08 19:33:18.457399619 +0100
++++ shadow-4.0.15/src/su.c	2006-03-08 19:33:53.727254950 +0100
+@@ -879,6 +879,35 @@
+ 			argv[0] = "-c";
+ 			argv[1] = command;
+ 		}
++		/* On Debian, the arguments are concatenated and the
++		 * resulted string is always given to the shell with its
++		 * -c option.
++		 */
++		{
++			char **parg;
++			unsigned int cmd_len = 0;
++			char *cmd = NULL;
++			if (strcmp(argv[0], "-c") != 0) {
++				argv--;
++				argv[0] = "-c";
++			}
++			/* Now argv[0] is always -c, and other arguments
++			 * can be concatenated
++			 */
++			cmd_len = 1; /* finale '\0' */
++			for (parg = &argv[1]; *parg; parg++) {
++				cmd_len += strlen (*parg) + 1;
++			}
++			cmd = (char *) xmalloc (sizeof (char) * cmd_len);
++			cmd[0] = '\0';
++			for (parg = &argv[1]; *parg; parg++) {
++				strcat (cmd, " ");
++				strcat (cmd, *parg);
++			}
++			cmd[cmd_len - 1] = '\0';
++			argv[1] = &cmd[1]; /* do not take first space */
++			argv[2] = NULL;
++		}
+ 		/*
+ 		 * Use the shell and create an argv
+ 		 * with the rest of the command line included.

Deleted: trunk/debian/patches/423_su_arguments_are_concatenated
===================================================================
--- trunk/debian/patches/423_su_arguments_are_concatenated	2006-05-07 06:04:01 UTC (rev 978)
+++ trunk/debian/patches/423_su_arguments_are_concatenated	2006-05-07 17:15:20 UTC (rev 979)
@@ -1,50 +0,0 @@
-Goal: Concatenate the non-su arguments and provide them to the shell with
-      the -c option
-Fixes: #317264
-       see also #276419
-
-Status wrt upstream: This is a Debian specific patch
-
-Note: the fix of the man page is still missing.
-      (to be taken from the trunk)
-
-Index: shadow-4.0.15/src/su.c
-===================================================================
---- shadow-4.0.15.orig/src/su.c	2006-03-08 19:33:18.457399619 +0100
-+++ shadow-4.0.15/src/su.c	2006-03-08 19:33:53.727254950 +0100
-@@ -879,6 +879,35 @@
- 			argv[0] = "-c";
- 			argv[1] = command;
- 		}
-+		/* On Debian, the arguments are concatenated and the
-+		 * resulted string is always given to the shell with its
-+		 * -c option.
-+		 */
-+		{
-+			char **parg;
-+			unsigned int cmd_len = 0;
-+			char *cmd = NULL;
-+			if (strcmp(argv[0], "-c") != 0) {
-+				argv--;
-+				argv[0] = "-c";
-+			}
-+			/* Now argv[0] is always -c, and other arguments
-+			 * can be concatenated
-+			 */
-+			cmd_len = 1; /* finale '\0' */
-+			for (parg = &argv[1]; *parg; parg++) {
-+				cmd_len += strlen (*parg) + 1;
-+			}
-+			cmd = (char *) xmalloc (sizeof (char) * cmd_len);
-+			cmd[0] = '\0';
-+			for (parg = &argv[1]; *parg; parg++) {
-+				strcat (cmd, " ");
-+				strcat (cmd, *parg);
-+			}
-+			cmd[cmd_len - 1] = '\0';
-+			argv[1] = &cmd[1]; /* do not take first space */
-+			argv[2] = NULL;
-+		}
- 		/*
- 		 * Use the shell and create an argv
- 		 * with the rest of the command line included.

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2006-05-07 06:04:01 UTC (rev 978)
+++ trunk/debian/patches/series	2006-05-07 17:15:20 UTC (rev 979)
@@ -31,7 +31,7 @@
 467_useradd_-r_LSB
 466_fflush-prompt
 468_duplicate_passwd_struct_before_usage
-423_su_arguments_are_concatenated
+323_su_arguments_are_concatenated
 423_su_arguments_are_no_more_concatenated_by_default
 479_chowntty_debug
 480_getopt_args_reorder




More information about the Pkg-shadow-commits mailing list