]> granicus.if.org Git - shadow/commitdiff
* src/login.c: Restore the echoctl, echoke, onclr flags to the
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 12 Apr 2009 00:17:36 +0000 (00:17 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 12 Apr 2009 00:17:36 +0000 (00:17 +0000)
terminal termio flags. Reset echoprt, noflsh, tostop. This
behavior seems to have change by mistake in earlier releases
(4.0.8, for no obvious reason).

ChangeLog
NEWS
src/login.c

index 8fb472182a8de84341d3b21b4010a28a5afcdf7c..30cf70348421fe9dc3ee2ed9ccd99de867a9bffc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-12  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/login.c: Restore the echoctl, echoke, onclr flags to the
+       terminal termio flags. Reset echoprt, noflsh, tostop. This
+       behavior seems to have change by mistake in earlier releases
+       (4.0.8, for no obvious reason).
+
 2009-04-12  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/login.c: Fix the count of failures before login exits in
diff --git a/NEWS b/NEWS
index d66f01341b689e2cb4e650e0a61d0ad39bd26adb..f8d88b33abb8d8b25d7648fb85af7bb28d4db182 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,10 @@ shadow-4.1.2.2 -> shadow-4.1.3                                               UNRELEASED
   * do not create groups with GID set to (gid_t)-1.
 - grpck
   * warn for groups with GID set to (gid_t)-1.
+- login
+  * Restore the echoctl, echoke, onclr flags to the terminal termio flags.
+    Reset echoprt, noflsh, tostop. This behavior seems to have change by
+    mistake in earlier releases (4.0.8, for no obvious reason).
 - newusers
   * Implement the -r, --system option.
   * Speedup (see "addition of users or groups" above).
index a77ca756cf0c6434d7e4294aaf57e3721604cdfd..39a0cc80326ebf0a4a5f5b088ff82c4d7098156d 100644 (file)
@@ -173,6 +173,16 @@ static void setup_tty (void)
        termio.c_lflag |= ISIG | ICANON | ECHO | ECHOE;
        termio.c_iflag |= ICRNL;
 
+#if defined(ECHOKE) && defined(ECHOCTL)
+       termio.c_lflag |= ECHOKE | ECHOCTL;
+#endif
+#if defined(ECHOPRT) && defined(NOFLSH) && defined(TOSTOP)
+       termio.c_lflag &= ~(ECHOPRT | NOFLSH | TOSTOP);
+#endif
+#ifdef ONLCR
+       termio.c_oflag |= ONLCR;
+#endif
+
        /* leave these values unchanged if not specified in login.defs */
        termio.c_cc[VERASE] = getdef_num ("ERASECHAR", termio.c_cc[VERASE]);
        termio.c_cc[VKILL] = getdef_num ("KILLCHAR", termio.c_cc[VKILL]);