summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-10 00:00:26 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-10 00:00:26 +0000
commit189a5543988f234e48c9132a0d56ba23aca3b979 (patch)
tree3d084c75ddd5ace0ab09fc851ab7e6d77870db54 /sys-apps/shadow
parentInitial import. Ebuild by Constantin Bergemann <tony@knueppelcore.de>. (diff)
downloadgentoo-2-189a5543988f234e48c9132a0d56ba23aca3b979.tar.gz
gentoo-2-189a5543988f234e48c9132a0d56ba23aca3b979.tar.bz2
gentoo-2-189a5543988f234e48c9132a0d56ba23aca3b979.zip
Grab a fix from upstream cvs to fix `su -c boo` syntax #118342 by Wolfgang Frisch.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r--sys-apps/shadow/ChangeLog10
-rw-r--r--sys-apps/shadow/files/digest-shadow-4.0.14-r1 (renamed from sys-apps/shadow/files/digest-shadow-4.0.14)0
-rw-r--r--sys-apps/shadow/files/shadow-4.0.14-su-cvs.patch75
-rw-r--r--sys-apps/shadow/shadow-4.0.14-r1.ebuild (renamed from sys-apps/shadow/shadow-4.0.14.ebuild)5
4 files changed, 88 insertions, 2 deletions
diff --git a/sys-apps/shadow/ChangeLog b/sys-apps/shadow/ChangeLog
index cc3a167feab9..20e2b5827186 100644
--- a/sys-apps/shadow/ChangeLog
+++ b/sys-apps/shadow/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/shadow
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.124 2006/01/04 02:37:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.125 2006/01/10 00:00:26 vapier Exp $
+
+*shadow-4.0.14-r1 (10 Jan 2006)
+
+ 10 Jan 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/shadow-4.0.14-su-cvs.patch, -shadow-4.0.14.ebuild,
+ +shadow-4.0.14-r1.ebuild:
+ Grab a fix from upstream cvs to fix `su -c boo` syntax #118342 by Wolfgang
+ Frisch.
*shadow-4.0.14 (04 Jan 2006)
diff --git a/sys-apps/shadow/files/digest-shadow-4.0.14 b/sys-apps/shadow/files/digest-shadow-4.0.14-r1
index c8fe2c833299..c8fe2c833299 100644
--- a/sys-apps/shadow/files/digest-shadow-4.0.14
+++ b/sys-apps/shadow/files/digest-shadow-4.0.14-r1
diff --git a/sys-apps/shadow/files/shadow-4.0.14-su-cvs.patch b/sys-apps/shadow/files/shadow-4.0.14-su-cvs.patch
new file mode 100644
index 000000000000..58c2a7d59a44
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.0.14-su-cvs.patch
@@ -0,0 +1,75 @@
+grab upstream fix for
+http://bugs.gentoo.org/118342
+
+===================================================================
+RCS file: /cvsroot/shadow/src/su.c,v
+retrieving revision 1.61
+retrieving revision 1.62
+diff -u -r1.61 -r1.62
+--- shadow/src/su.c 2006/01/02 22:37:47 1.61
++++ shadow/src/su.c 2006/01/07 19:38:15 1.62
+@@ -256,6 +256,7 @@
+ fprintf (stderr, _("Usage: su [options] [login]\n"
+ "\n"
+ "Options:\n"
++ " -c, --command COMMAND pass COMMAND to the invoked shell\n"
+ " -h, --help display this help message and exit\n"
+ " -, -l, --login make the shell a login shell\n"
+ " -m, -p,\n"
+@@ -286,7 +287,7 @@
+ uid_t my_uid;
+ struct passwd *pw = 0;
+ char **envp = environ;
+- char *shellstr = 0;
++ char *shellstr = 0, *command = 0;
+
+ #ifdef USE_PAM
+ int ret;
+@@ -328,6 +329,7 @@
+ int option_index = 0;
+ int c;
+ static struct option long_options[] = {
++ {"command", required_argument, NULL, 'c'},
+ {"help", no_argument, NULL, 'h'},
+ {"login", no_argument, NULL, 'l'},
+ {"preserve-environment", no_argument, NULL, 'p'},
+@@ -336,7 +338,7 @@
+ };
+
+ while ((c =
+- getopt_long (argc, argv, "-hlmps:", long_options,
++ getopt_long (argc, argv, "-c:hlmps:", long_options,
+ &option_index)) != -1) {
+ switch (c) {
+ case 1:
+@@ -349,6 +351,9 @@
+ optind--;
+ goto end_su_options;
+ break; /* NOT REACHED */
++ case 'c':
++ command = optarg;
++ break;
+ case 'h':
+ usage ();
+ break;
+@@ -423,6 +428,8 @@
+ (void) strcpy (name, "root");
+
+ doshell = argc == optind; /* any arguments remaining? */
++ if (command)
++ doshell = 0;
+
+ /*
+ * Get the user's real name. The current UID is used to determine
+@@ -832,6 +839,11 @@
+ if (!doshell) {
+ /* Position argv to the remaining arguments */
+ argv += optind;
++ if (command) {
++ argv -= 2;
++ argv[0] = "-c";
++ argv[1] = command;
++ }
+ /*
+ * Use the shell and create an argv
+ * with the rest of the command line included.
diff --git a/sys-apps/shadow/shadow-4.0.14.ebuild b/sys-apps/shadow/shadow-4.0.14-r1.ebuild
index 99c2c4aae2a6..cc6811a3a3df 100644
--- a/sys-apps/shadow/shadow-4.0.14.ebuild
+++ b/sys-apps/shadow/shadow-4.0.14-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.14.ebuild,v 1.1 2006/01/04 02:37:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.14-r1.ebuild,v 1.1 2006/01/10 00:00:26 vapier Exp $
inherit eutils libtool toolchain-funcs flag-o-matic
@@ -58,6 +58,9 @@ src_unpack() {
# Patch from upstream enables the new environment too early for PAM
epatch "${FILESDIR}"/${PN}-4.0.14-su-fix-environment.patch
+ # Patch from upstream fixes `su -c ls` #118342
+ epatch "${FILESDIR}"/${P}-su-cvs.patch
+
# Some UCLIBC patches
epatch "${FILESDIR}"/${PN}-4.0.11.1-uclibc-missing-l64a.patch