diff options
| author | darrenm <none@none> | 2007-12-06 13:08:21 -0800 |
|---|---|---|
| committer | darrenm <none@none> | 2007-12-06 13:08:21 -0800 |
| commit | eedefb957fd12dc52be22145a83874a71050e784 (patch) | |
| tree | 785cfb6fcc4c224706d250c88a27243e5261eb13 /usr/src | |
| parent | b0aab85ccbd3a1807f0b7b8fa5bd0b7526f6cc12 (diff) | |
| download | illumos-gate-eedefb957fd12dc52be22145a83874a71050e784.tar.gz | |
6636680 MS-CHAP support in pppd is completely broken
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile | 6 | ||||
| -rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c | 10 | ||||
| -rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile b/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile index 0946e38299..87a91822ee 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile @@ -1,7 +1,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/cmd-inet/usr.bin/pppd/Makefile @@ -45,7 +45,7 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG all: $(PROG) $(SUBDIRS) # MS-CHAP support -CPPFLAGS += -DHAVE_CRYPT_H -DUSE_CRYPT +CPPFLAGS += -DHAVE_CRYPT_H -DUSE_CRYPT -DHAVE_LIBMD CPPFLAGS += -DCHAPMS -DMSLANMAN CPPFLAGS += -DCHAPMSV2 OBJS += chap_ms.o @@ -56,7 +56,7 @@ CLOBBERFILES += mschap_test # required for MS-CHAPv1. It is not needed in any normal system and # is not built by default. mschap_test: mschap_test.o chap_ms.o - $(LINK.c) -o mschap_test mschap_test.o chap_ms.o $(LDFLAGS) + $(LINK.c) -o mschap_test mschap_test.o chap_ms.o $(LDFLAGS) -lmd @echo "Run with 'mschap_test 00000000000000000000000000000000 hello'" @echo @echo "Output should be:" diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c index 7cd7e0a3a7..21cf5ee114 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c @@ -1,8 +1,8 @@ /* * chap_ms.c - Microsoft MS-CHAP compatible implementation. * - * Copyright (c) 2000 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. * * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited. * http://www.strataware.com/ @@ -290,7 +290,7 @@ ChapMS_NT(rchallenge, secret, secret_len, response) MS_ChapResponse *response; { int i; -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(HAVE_LIBMD) /* NetBSD uses the libc md4 routines which take bytes instead of bits */ int mdlen = secret_len * 2; #else @@ -457,7 +457,7 @@ ChapMSv2_NT(username, rchallenge, secret, secret_len, response) MS_Chapv2Response *response; { int i; -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(HAVE_LIBMD) /* NetBSD uses the libc md4 routines that take bytes instead of bits */ int mdlen = secret_len * 2; #else @@ -525,7 +525,7 @@ ChapMSv2Success(cstate, msresp, authchall, rhostname, secret, secret_len) static const u_char Magic1[39] = "Magic server to client signing constant"; static const u_char Magic2[41] = "Pad to make it do more than one iteration"; -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(HAVE_LIBMD) /* NetBSD uses the libc md4 routines that take bytes instead of bits */ int mdlen = 1; #else diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c index 588a482199..3202348a32 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c @@ -1,8 +1,8 @@ /* * Test MS-CHAPv1 library code. * - * Copyright (c) 2000 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. * * Originally from the README.MSCHAP80 file written by: * Eric Rosenquist rosenqui@strataware.com @@ -87,5 +87,5 @@ int main(argc, argv) printf("Cannot validate own MS-CHAPv2 response.\n"); #endif - exit(0); + return (0); } |
