[ppc44x] optimize the kernel for size, disable common PCI quirks, and sync kernel...
[openwrt.git] / package / ppp / patches / 106-debian_stripMSdomain.patch
1 --- a/pppd/chap-new.c
2 +++ b/pppd/chap-new.c
3 @@ -57,6 +57,7 @@ int (*chap_verify_hook)(char *name, char
4 int chap_timeout_time = 3;
5 int chap_max_transmits = 10;
6 int chap_rechallenge_time = 0;
7 +int chapms_strip_domain = 0;
8
9 /*
10 * Command-line options.
11 @@ -68,6 +69,8 @@ static option_t chap_option_list[] = {
12 "Set max #xmits for challenge", OPT_PRIO },
13 { "chap-interval", o_int, &chap_rechallenge_time,
14 "Set interval for rechallenge", OPT_PRIO },
15 + { "chapms-strip-domain", o_bool, &chapms_strip_domain,
16 + "Strip the domain prefix before the Username", 1 },
17 { NULL }
18 };
19
20 @@ -335,6 +338,14 @@ chap_handle_response(struct chap_server_
21 /* Null terminate and clean remote name. */
22 slprintf(rname, sizeof(rname), "%.*v", len, name);
23 name = rname;
24 +
25 + /* strip the MS domain name */
26 + if (chapms_strip_domain && strrchr(rname, '\\')) {
27 + char tmp[MAXNAMELEN+1];
28 +
29 + strcpy(tmp, strrchr(rname, '\\') + 1);
30 + strcpy(rname, tmp);
31 + }
32 }
33
34 if (chap_verify_hook)
This page took 0.041235 seconds and 5 git commands to generate.