]>
Commit | Line | Data |
---|---|---|
e6c4823f | 1 | diff -uNra ppp-2.4.2/pppd/auth.c ppp-2.4.2-new/pppd/auth.c |
2 | --- ppp-2.4.2/pppd/auth.c Thu Jun 12 00:56:26 2003 | |
3 | +++ ppp-2.4.2-new/pppd/auth.c Sat Dec 20 19:21:38 2003 | |
4 | @@ -232,6 +232,7 @@ | |
5 | #ifdef CHAPMS | |
6 | bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */ | |
7 | bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */ | |
8 | +bool ms_ignore_domain = 0; /* Ignore any MS domain prefix */ | |
9 | #else | |
10 | bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */ | |
11 | bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */ | |
12 | @@ -319,6 +320,8 @@ | |
13 | "Require MS-CHAPv2 authentication from peer", | |
14 | OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2, | |
15 | &lcp_wantoptions[0].chap_mdtype }, | |
16 | + { "ms-ignore-domain", o_bool, &ms_ignore_domain, | |
17 | + "Ignore any MS domain prefix in the username", 1 }, | |
18 | #endif | |
19 | ||
20 | { "refuse-pap", o_bool, &refuse_pap, | |
21 | diff -uNra ppp-2.4.2/pppd/chap-new.c ppp-2.4.2-new/pppd/chap-new.c | |
22 | --- ppp-2.4.2/pppd/chap-new.c Thu Nov 27 22:22:36 2003 | |
23 | +++ ppp-2.4.2-new/pppd/chap-new.c Sat Dec 20 19:17:42 2003 | |
24 | @@ -396,6 +396,14 @@ | |
25 | int ok; | |
26 | char secret[MAXSECRETLEN]; | |
27 | int secret_len; | |
28 | +#ifdef CHAPMS | |
29 | + char nametmp[MAXNAMELEN]; | |
30 | + | |
31 | + if (ms_ignore_domain && strrchr(name, '\\')) { | |
32 | + strcpy(nametmp, strrchr(name, '\\') + 1); | |
33 | + strcpy(name, nametmp); | |
34 | + } | |
35 | +#endif | |
36 | ||
37 | /* Get the secret that the peer is supposed to know */ | |
38 | if (!get_secret(0, name, ourname, secret, &secret_len, 1)) { | |
39 | diff -uNra ppp-2.4.2/pppd/pppd.h ppp-2.4.2-new/pppd/pppd.h | |
40 | --- ppp-2.4.2/pppd/pppd.h Mon Apr 7 01:01:46 2003 | |
41 | +++ ppp-2.4.2-new/pppd/pppd.h Sat Dec 20 18:58:23 2003 | |
42 | @@ -310,6 +310,10 @@ | |
43 | extern bool dump_options; /* print out option values */ | |
44 | extern bool dryrun; /* check everything, print options, exit */ | |
45 | ||
46 | +#ifdef CHAPMS | |
47 | +extern bool ms_ignore_domain; /* Ignore any MS domain prefix */ | |
48 | +#endif | |
49 | + | |
50 | #ifdef MAXOCTETS | |
51 | extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ | |
52 | extern int maxoctets_dir; /* Direction : |