switch: remove message about BFL_ENETADM not being set on systems with a roboswitch
[openwrt.git] / package / ppp / patches / 107-debian_stripMSdomain.patch
1 Index: ppp-2.4.3/pppd/chap-new.c
2 ===================================================================
3 --- ppp-2.4.3.orig/pppd/chap-new.c      2007-06-04 13:22:08.298593704 +0200
4 +++ ppp-2.4.3/pppd/chap-new.c   2007-06-04 13:22:11.199152752 +0200
5 @@ -57,6 +57,7 @@
6  int chap_timeout_time = 3;
7  int chap_max_transmits = 10;
8  int chap_rechallenge_time = 0;
9 +int chapms_strip_domain = 0;
10  
11  /*
12   * Command-line options.
13 @@ -68,6 +69,8 @@
14           "Set max #xmits for challenge", OPT_PRIO },
15         { "chap-interval", o_int, &chap_rechallenge_time,
16           "Set interval for rechallenge", OPT_PRIO },
17 +       { "chapms-strip-domain", o_bool, &chapms_strip_domain,
18 +         "Strip the domain prefix before the Username", 1 },
19         { NULL }
20  };
21  
22 @@ -338,6 +341,14 @@
23                         /* Null terminate and clean remote name. */
24                         slprintf(rname, sizeof(rname), "%.*v", len, name);
25                         name = rname;
26 +
27 +                       /* strip the MS domain name */
28 +                       if (chapms_strip_domain && strrchr(rname, '\\')) {
29 +                               char tmp[MAXNAMELEN+1];
30 +
31 +                               strcpy(tmp, strrchr(rname, '\\') + 1);
32 +                               strcpy(rname, tmp);
33 +                       }
34                 }
35  
36                 if (chap_verify_hook)