[Pkg-shadow-commits] r981 - trunk/debian/patches
Christian Perrier
bubulle at costa.debian.org
Sun May 7 20:20:21 UTC 2006
Author: bubulle
Date: 2006-05-07 20:20:20 +0000 (Sun, 07 May 2006)
New Revision: 981
Added:
trunk/debian/patches/523_su_arguments_are_concatenated
trunk/debian/patches/523_su_arguments_are_no_more_concatenated_by_default
Removed:
trunk/debian/patches/323_su_arguments_are_concatenated
trunk/debian/patches/423_su_arguments_are_no_more_concatenated_by_default
Modified:
trunk/debian/patches/series
Log:
So, the 423 patches are Debian specific. Hence in the 5xx series
Deleted: trunk/debian/patches/323_su_arguments_are_concatenated
===================================================================
--- trunk/debian/patches/323_su_arguments_are_concatenated 2006-05-07 17:16:14 UTC (rev 980)
+++ trunk/debian/patches/323_su_arguments_are_concatenated 2006-05-07 20:20:20 UTC (rev 981)
@@ -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. 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_no_more_concatenated_by_default
===================================================================
--- trunk/debian/patches/423_su_arguments_are_no_more_concatenated_by_default 2006-05-07 17:16:14 UTC (rev 980)
+++ trunk/debian/patches/423_su_arguments_are_no_more_concatenated_by_default 2006-05-07 20:20:20 UTC (rev 981)
@@ -1,52 +0,0 @@
-Goal: Do not concatenate the additional arguments, and support an
- environment variable to revert to the old Debian's su behavior.
-
-This patch needs the su_arguments_are_concatenated patch.
-
-This patch, and su_arguments_are_concatenated should be dropped after
-Etch.
-
-Status wrt upstream: This patch is Debian specific.
-
-Index: shadow-4.0.14/src/su.c
-===================================================================
---- shadow-4.0.14.orig/src/su.c 2006-02-27 20:44:34.000000000 +0100
-+++ shadow-4.0.14/src/su.c 2006-02-27 21:15:39.000000000 +0100
-@@ -76,6 +76,19 @@
- /* If nonzero, change some environment vars to indicate the user su'd to. */
- static int change_environment;
-
-+/*
-+ * If nonzero, keep the old Debian behavior:
-+ * * concatenate all the arguments and provide them to the -c option of
-+ * the shell
-+ * * If there are some additional arguments, but no -c, add a -c
-+ * argument anyway
-+ * Drawbacks:
-+ * * you can't provide options to the shell (other than -c)
-+ * * you can't rely on the argument count
-+ * See http://bugs.debian.org/276419
-+ */
-+static int old_debian_behavior;
-+
- #ifdef USE_PAM
- static pam_handle_t *pamh = NULL;
- static int caught = 0;
-@@ -319,6 +332,8 @@
- #endif
- #endif /* !USE_PAM */
-
-+ old_debian_behavior = (getenv("SU_NO_SHELL_ARGS") != NULL);
-+
- /* sanitize_env (); */
-
- setlocale (LC_ALL, "");
-@@ -871,7 +886,7 @@
- * resulted string is always given to the shell with its
- * -c option.
- */
-- {
-+ if (old_debian_behavior) {
- char **parg;
- unsigned int cmd_len = 0;
- char *cmd = NULL;
Copied: trunk/debian/patches/523_su_arguments_are_concatenated (from rev 980, trunk/debian/patches/323_su_arguments_are_concatenated)
===================================================================
--- trunk/debian/patches/323_su_arguments_are_concatenated 2006-05-07 17:16:14 UTC (rev 980)
+++ trunk/debian/patches/523_su_arguments_are_concatenated 2006-05-07 20:20:20 UTC (rev 981)
@@ -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.
+
+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.
Copied: trunk/debian/patches/523_su_arguments_are_no_more_concatenated_by_default (from rev 980, trunk/debian/patches/423_su_arguments_are_no_more_concatenated_by_default)
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2006-05-07 17:16:14 UTC (rev 980)
+++ trunk/debian/patches/series 2006-05-07 20:20:20 UTC (rev 981)
@@ -31,8 +31,8 @@
467_useradd_-r_LSB
466_fflush-prompt
468_duplicate_passwd_struct_before_usage
-323_su_arguments_are_concatenated
-423_su_arguments_are_no_more_concatenated_by_default
+523_su_arguments_are_concatenated
+523_su_arguments_are_no_more_concatenated_by_default
479_chowntty_debug
480_getopt_args_reorder
482_libmisc_copydir_check_return_values
More information about the Pkg-shadow-commits
mailing list