]> granicus.if.org Git - shadow/commitdiff
Import Debian patch 434_login_stop_checking_args_after--
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 May 2008 14:54:35 +0000 (14:54 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 May 2008 14:54:35 +0000 (14:54 +0000)
* NEWS, src/login.c (check_flags): Stop checking the arguments
after --. The later options will be sent to the shell, and do not
need to be checked.

ChangeLog
NEWS
src/login.c

index 84d1e26010dec89210bf2846e8f8386f49c50e68..8d7d79c52ebe830037ab003d0b2040a951129d54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-18  Nicolas François  <nicolas.francois@centraliens.net>
+
+       Import Debian patch 434_login_stop_checking_args_after--
+       * NEWS, src/login.c (check_flags): Stop checking the arguments
+       after --. The later options will be sent to the shell, and do not
+       need to be checked.
+
 2008-05-18  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/vipw.c, src/su.c, src/newgrp.c: Harmonize the children's
diff --git a/NEWS b/NEWS
index c0e1c5b6b7445e654dcc77c1d40a6f5761960308..ffdbb201207c7eca55731808c33118da12c680b3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ shadow-4.1.1 -> shadow-4.1.2                                          UNRELEASED
 - chfn
   * Allow non-US-ASCII characters in the GECOS fields ("name", "room
     number", and "other info" fields).
+- login
+  * Do not fail if a shell option, specified after --, has more than 2
+    letters.
 - su
   * If the SULOG_FILE does not exist when an su session is logged, make
     sure the file is created with group root, instead of using the group
index b4ade95e3b8b6dac9df85bb39857f6feb0192672..9920840bcb9ccb965623045e3ba9be5a3b9ef0c6 100644 (file)
@@ -251,6 +251,9 @@ static void check_flags (int argc, char *const *argv)
        for (arg = 1; arg < argc; arg++) {
                if (argv[arg][0] == '-' && strlen (argv[arg]) > 2)
                        usage ();
+               if (strcmp(argv[arg], "--") == 0) {
+                       break; /* stop checking on a "--" */
+               }
        }
 }