[Pkg-shadow-devel] [shadow] 05/07: Drop patches manipulating su argument concatenation:
Balint Reczey
rbalint at debian.org
Sun Sep 17 21:43:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
rbalint pushed a commit to branch master
in repository shadow.
commit b43b5a89d115a16544e2705450b4e9a72490396c
Author: Balint Reczey <balint.reczey at canonical.com>
Date: Fri Aug 11 11:16:45 2017 -0400
Drop patches manipulating su argument concatenation:
- 523_su_arguments_are_concatenated
- su_arguments_are_no_more_concatenated_by_default
---
debian/patches/523_su_arguments_are_concatenated | 48 ---------------------
...u_arguments_are_no_more_concatenated_by_default | 50 ----------------------
debian/patches/series | 2 -
3 files changed, 100 deletions(-)
diff --git a/debian/patches/523_su_arguments_are_concatenated b/debian/patches/523_su_arguments_are_concatenated
deleted file mode 100644
index 954ddc9..0000000
--- a/debian/patches/523_su_arguments_are_concatenated
+++ /dev/null
@@ -1,48 +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)
-
---- a/src/su.c
-+++ b/src/su.c
-@@ -1201,6 +1201,35 @@
- argv[0] = "-c";
- argv[1] = command;
- }
-+ /* On Debian, the arguments are concatenated and the
-+ * resulting 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.
diff --git a/debian/patches/523_su_arguments_are_no_more_concatenated_by_default b/debian/patches/523_su_arguments_are_no_more_concatenated_by_default
deleted file mode 100644
index ed6f504..0000000
--- a/debian/patches/523_su_arguments_are_no_more_concatenated_by_default
+++ /dev/null
@@ -1,50 +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.
-
---- a/src/su.c
-+++ b/src/su.c
-@@ -104,6 +104,19 @@
- /* If nonzero, change some environment vars to indicate the user su'd to. */
- static bool change_environment = true;
-
-+/*
-+ * 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 char kill_msg[256];
- static char wait_msg[256];
-@@ -983,6 +996,8 @@
- int ret;
- #endif /* USE_PAM */
-
-+ old_debian_behavior = (getenv("SU_NO_SHELL_ARGS") != NULL);
-+
- (void) setlocale (LC_ALL, "");
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
- (void) textdomain (PACKAGE);
-@@ -1205,7 +1220,7 @@
- * resulting 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;
diff --git a/debian/patches/series b/debian/patches/series
index 8d6f689..68dc397 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,8 +11,6 @@
506_relaxed_usernames
542_useradd-O_option
463_login_delay_obeys_to_PAM
-523_su_arguments_are_concatenated
-523_su_arguments_are_no_more_concatenated_by_default
508_nologin_in_usr_sbin
505_useradd_recommend_adduser
501_commonio_group_shadow
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shadow/shadow.git
More information about the Pkg-shadow-devel
mailing list