]> git.pld-linux.org Git - packages/ppp.git/blame - pppd-2.4.2-chapms-strip-domain.patch
- disable mppc patch by default (changes existing configuration options and added...
[packages/ppp.git] / pppd-2.4.2-chapms-strip-domain.patch
CommitLineData
624b49b7
JB
1--- ppp-2.5.0/pppd/auth.c.orig 2023-03-25 05:38:30.000000000 +0100
2+++ ppp-2.5.0/pppd/auth.c 2023-08-21 06:29:42.669826958 +0200
3@@ -242,6 +242,7 @@ bool refuse_eap = 0; /* Don't wanna aut
4 #ifdef PPP_WITH_CHAPMS
e6c4823f 5 bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */
6 bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */
7+bool ms_ignore_domain = 0; /* Ignore any MS domain prefix */
8 #else
9 bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */
10 bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
624b49b7 11@@ -354,6 +355,8 @@ struct option auth_options[] = {
e6c4823f 12 "Require MS-CHAPv2 authentication from peer",
13 OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2,
14 &lcp_wantoptions[0].chap_mdtype },
15+ { "ms-ignore-domain", o_bool, &ms_ignore_domain,
16+ "Ignore any MS domain prefix in the username", 1 },
17 #endif
18
19 { "refuse-pap", o_bool, &refuse_pap,
624b49b7
JB
20--- ppp-2.5.0/pppd/chap.c.orig 2023-08-21 06:25:48.917759969 +0200
21+++ ppp-2.5.0/pppd/chap.c 2023-08-21 06:25:52.174408993 +0200
22@@ -453,6 +453,14 @@ chap_verify_response(char *name, char *o
e6c4823f 23 int ok;
ea686db0 24 unsigned char secret[MAXSECRETLEN];
e6c4823f 25 int secret_len;
624b49b7 26+#ifdef PPP_WITH_CHAPMS
e6c4823f 27+ char nametmp[MAXNAMELEN];
28+
29+ if (ms_ignore_domain && strrchr(name, '\\')) {
30+ strcpy(nametmp, strrchr(name, '\\') + 1);
31+ strcpy(name, nametmp);
32+ }
33+#endif
34
35 /* Get the secret that the peer is supposed to know */
ea686db0 36 if (!get_secret(0, name, ourname, (char *)secret, &secret_len, 1)) {
624b49b7
JB
37--- ppp-2.5.0/pppd/pppd-private.h.orig 2022-12-30 02:12:39.000000000 +0100
38+++ ppp-2.5.0/pppd/pppd-private.h 2023-08-21 06:28:01.690374011 +0200
39@@ -207,6 +207,10 @@ extern int privileged_option; /* set i
40 extern char *option_source; /* string saying where the option came from */
41 extern int option_priority; /* priority of current options */
e6c4823f 42
624b49b7 43+#ifdef PPP_WITH_CHAPMS
e6c4823f 44+extern bool ms_ignore_domain; /* Ignore any MS domain prefix */
45+#endif
46+
624b49b7
JB
47 #ifdef PPP_WITH_IPV6CP
48 extern char path_ipv6up[]; /* pathname of ipv6-up script */
49 extern char path_ipv6down[]; /* pathname of ipv6-down script */
This page took 0.140423 seconds and 4 git commands to generate.