~cyphermox/ubuntu/vivid/ppp/merge-2.4.6

« back to all changes in this revision

Viewing changes to debian/patches/no_crypt_hack

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2014-11-05 05:35:43 UTC
  • mfrom: (2.1.16 sid)
  • Revision ID: mathieu-tl@ubuntu.com-20141105053543-pwkdzpn4zae420uw
* Merge with Debian unstable; remaining changes:
  - debian/patches/load_ppp_generic_if_needed: load ppp_generic kernel
    module if needed.
  - add EAP-TLS/MPPE support patch from Jan Just Keijser.
  - debian/control: add libssl-dev to Build-Depends for the EAP-TLS patch.
* debian/patches/ppp-2.4.5-eaptls-mppe-0.994.patch,
  debian/patches/ppp-2.4.6-eaptls-mppe-0.997.patch: updated the EAP-TLS/MPPE
  support patch to the latest version from its upstream (also refreshed it).
* debian/ppp.preinst: deal with the change in LSB headers start runlevels
  of pppd-dns due to dropping our changes (which are no longer necessary
  since resolvconf is installed in most systems and has been for a while);
  this should probably be kept until the next LTS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
--- a/pppd/auth.c
6
6
+++ b/pppd/auth.c
7
7
@@ -1442,8 +1442,10 @@ check_passwd(unit, auser, userlen, apass
8
 
            }
9
8
            if (secret[0] != 0 && !login_secret) {
10
9
                /* password given in pap-secrets - must match */
 
10
                if (cryptpap || strcmp(passwd, secret) != 0) {
11
11
+#ifndef NO_CRYPT_HACK
12
 
                if ((cryptpap || strcmp(passwd, secret) != 0)
13
 
                    && strcmp(crypt(passwd, secret), secret) != 0)
 
12
                    char *cbuf = crypt(passwd, secret);
 
13
                    if (!cbuf || strcmp(cbuf, secret) != 0)
14
14
+#endif
15
 
                    ret = UPAP_AUTHNAK;
 
15
                        ret = UPAP_AUTHNAK;
 
16
                }
16
17
            }
17
 
        }
18
18
--- a/pppd/Makefile.linux
19
19
+++ b/pppd/Makefile.linux
20
 
@@ -116,10 +116,14 @@ COMPILE_FLAGS += -DHAS_SHADOW
 
20
@@ -121,10 +121,14 @@ CFLAGS   += -DHAS_SHADOW
21
21
 #LIBS     += -lshadow $(LIBS)
22
22
 endif
23
23
 
24
24
+ifdef NO_CRYPT_HACK
25
 
+COMPILE_FLAGS += -DNO_CRYPT_HACK
 
25
+CFLAGS += -DNO_CRYPT_HACK
26
26
+else
27
27
 ifneq ($(wildcard /usr/include/crypt.h),)
28
 
 COMPILE_FLAGS += -DHAVE_CRYPT_H=1
 
28
 CFLAGS  += -DHAVE_CRYPT_H=1
29
29
 LIBS   += -lcrypt
30
30
 endif
31
31
+endif
32
32
 
33
 
 ifdef NEEDDES
34
 
 ifndef USE_CRYPT
 
33
 ifdef USE_LIBUTIL
 
34
 CFLAGS += -DHAVE_LOGWTMP=1
35
35
--- a/pppd/session.c
36
36
+++ b/pppd/session.c
37
 
@@ -348,8 +348,10 @@ session_start(flags, user, passwd, ttyNa
38
 
        /*
39
 
         * If no passwd, don't let them login if we're authenticating.
 
37
@@ -351,8 +351,10 @@ session_start(flags, user, passwd, ttyNa
40
38
         */
 
39
         if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2)
 
40
             return SESSION_FAILED;
41
41
+#ifndef NO_CRYPT_HACK
42
 
         if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2
43
 
             || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
 
42
        cbuf = crypt(passwd, pw->pw_passwd);
 
43
        if (!cbuf || strcmp(cbuf, pw->pw_passwd) != 0)
44
44
+#endif
45
45
             return SESSION_FAILED;
46
46
     }