1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 18:15:54 +02:00
openwrt-xburst/obsolete-buildroot/sources/openwrt/patches/ppp/no_crypt_hack
mbm 097635b79b massive changes
- sstrip cleanup from mjn3
- various patches from nico and others: http://openwrt.org/forum/viewtopic.php?t=368


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@145 3c298f89-4303-0410-b956-a3cf2f4a3e73
2004-08-24 23:50:14 +00:00

46 lines
1.2 KiB
Plaintext

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