[Pkg-shadow-commits] r1495 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Wed Dec 26 15:10:48 UTC 2007


Author: nekral-guest
Date: 2007-12-26 15:10:48 +0000 (Wed, 26 Dec 2007)
New Revision: 1495

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/NEWS
   upstream/trunk/src/su.c
Log:
su's arguments are now reordered. If needed, use -- to separate su's
options from the shell's options.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2007-12-26 14:56:06 UTC (rev 1494)
+++ upstream/trunk/ChangeLog	2007-12-26 15:10:48 UTC (rev 1495)
@@ -1,5 +1,10 @@
 2007-12-26  Nicolas François  <nicolas.francois at centraliens.net>
 
+	Merge Debian's patch 480_getopt_args_reorder
+	* NEWS, src/su.c: su's arguments are now reordered.
+
+2007-12-26  Nicolas François  <nicolas.francois at centraliens.net>
+
 	Merge RedHat's patch shadow-4.0.18.1-mtime.patch:
 	* NEWS: Document that usermod will now preserve user's file modification
 	and access time.

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2007-12-26 14:56:06 UTC (rev 1494)
+++ upstream/trunk/NEWS	2007-12-26 15:10:48 UTC (rev 1495)
@@ -10,6 +10,9 @@
 - usermod
   * Keep the access and modification time of files when moving an user's home
     directory.
+- su
+  * su's arguments are now reordered. If needed, use -- to separate su's
+    options from the shell's options.
 
 shadow-4.0.18.2 -> shadow-4.1.0						09-12-2008
 

Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c	2007-12-26 14:56:06 UTC (rev 1494)
+++ upstream/trunk/src/su.c	2007-12-26 15:10:48 UTC (rev 1495)
@@ -362,19 +362,9 @@
 		};
 
 		while ((c =
-			getopt_long (argc, argv, "-c:hlmps:", long_options,
+			getopt_long (argc, argv, "c:hlmps:", long_options,
 				     &option_index)) != -1) {
 			switch (c) {
-			case 1:
-				/* this is not an su option */
-				/* The next arguments are either '-', the
-				 * target name, or arguments to be passed
-				 * to the shell.
-				 */
-				/* rewind the (not yet handled) option */
-				optind--;
-				goto end_su_options;
-				break;	/* NOT REACHED */
 			case 'c':
 				command = optarg;
 				break;
@@ -399,7 +389,7 @@
 				usage ();	/* NOT REACHED */
 			}
 		}
-	      end_su_options:
+
 		if (optind < argc && !strcmp (argv[optind], "-")) {
 			fakelogin = 1;
 			optind++;




More information about the Pkg-shadow-commits mailing list