summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack')
-rw-r--r--obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack45
1 files changed, 45 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack b/obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack
new file mode 100644
index 000000000..501409ea9
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack
@@ -0,0 +1,45 @@
+diff -ruN ppp.orig/pppd/auth.c ppp/pppd/auth.c
+--- ppp.orig/pppd/auth.c 2003-06-12 02:01:21.000000000 +0200
++++ ppp/pppd/auth.c 2003-12-02 14:48:40.000000000 +0100
+@@ -1292,8 +1292,10 @@
+ }
+ if (secret[0] != 0 && !login_secret) {
+ /* password given in pap-secrets - must match */
++#ifndef NO_CRYPT_HACK
+ if ((cryptpap || strcmp(passwd, secret) != 0)
+ && strcmp(crypt(passwd, secret), secret) != 0)
++#endif
+ ret = UPAP_AUTHNAK;
+ }
+ }
+@@ -1495,8 +1497,10 @@
+ /*
+ * If no passwd, don't let them login.
+ */
++#ifndef NO_CRYPT_HACK
+ if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2
+ || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
++#endif
+ return (UPAP_AUTHNAK);
+
+ #endif /* #ifdef USE_PAM */
+diff -ruN ppp.orig/pppd/Makefile.linux ppp/pppd/Makefile.linux
+--- ppp.orig/pppd/Makefile.linux 2003-11-27 23:00:22.000000000 +0100
++++ ppp/pppd/Makefile.linux 2003-12-02 14:47:53.000000000 +0100
+@@ -116,12 +116,16 @@
+ #LIBS += -lshadow $(LIBS)
+ endif
+
++ifdef NO_CRYPT_HACK
++CFLAGS += -DNO_CRYPT_HACK
++else
+ ifneq ($(wildcard /usr/include/crypt.h),)
+ CFLAGS += -DHAVE_CRYPT_H=1
+ endif
+ ifneq ($(wildcard /usr/lib/libcrypt.*),)
+ LIBS += -lcrypt
+ endif
++endif
+
+ ifdef NEEDDES
+ ifndef USE_CRYPT