~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to debian/patches/415_login_put-echoctl-back

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Goal: Re-activate ECHOCTL in login
2
 
 
3
 
Fixes: #429758
4
 
 
5
 
Status wrt upstream: Not reported yet. 
6
 
 
7
 
Note: Was removed by upstream in 4.0.8 with "remove dead code" comment
8
 
 
9
 
Index: shadow-4.1.0/src/login.c
10
 
===================================================================
11
 
--- shadow-4.1.0.orig/src/login.c
12
 
+++ shadow-4.1.0/src/login.c
13
 
@@ -175,6 +175,16 @@
14
 
        termio.c_lflag |= ISIG | ICANON | ECHO | ECHOE;
15
 
        termio.c_iflag |= ICRNL;
16
 
 
17
 
+#if defined(ECHOKE) && defined(ECHOCTL)
18
 
+       termio.c_lflag |= ECHOKE | ECHOCTL;
19
 
+#endif
20
 
+#if defined(ECHOPRT) && defined(NOFLSH) && defined(TOSTOP)
21
 
+       termio.c_lflag &= ~(ECHOPRT | NOFLSH | TOSTOP);
22
 
+#endif
23
 
+#ifdef ONLCR
24
 
+       termio.c_oflag |= ONLCR;
25
 
+#endif
26
 
+
27
 
        /* leave these values unchanged if not specified in login.defs */
28
 
        termio.c_cc[VERASE] = getdef_num ("ERASECHAR", termio.c_cc[VERASE]);
29
 
        termio.c_cc[VKILL] = getdef_num ("KILLCHAR", termio.c_cc[VKILL]);