Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37572177
en ru br
ALT Linux repos
S:2.5.0-alt1
5.0: 2.4.4-alt11
4.1: 2.4.4-alt10.M41.1
4.0: 2.4.4-alt10
+updates:2.4.4-alt10
3.0: 2.4.2-alt6
+updates:2.4.2-alt6.M30.1

Group :: Networking/Other
RPM: ppp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: pppd-2.4.2-chapms-strip-domain.patch
Download


diff -uNra ppp-2.4.2/pppd/auth.c ppp-2.4.2-new/pppd/auth.c
--- ppp-2.4.2/pppd/auth.c	Thu Jun 12 00:56:26 2003
+++ ppp-2.4.2-new/pppd/auth.c	Sat Dec 20 19:21:38 2003
@@ -232,6 +232,7 @@
 #ifdef CHAPMS
 bool refuse_mschap = 0;		/* Don't wanna auth. ourselves with MS-CHAP */
 bool refuse_mschap_v2 = 0;	/* Don't wanna auth. ourselves with MS-CHAPv2 */
+bool ms_ignore_domain = 0;	/* Ignore any MS domain prefix */
 #else
 bool refuse_mschap = 1;		/* Don't wanna auth. ourselves with MS-CHAP */
 bool refuse_mschap_v2 = 1;	/* Don't wanna auth. ourselves with MS-CHAPv2 */
@@ -319,6 +320,8 @@
       "Require MS-CHAPv2 authentication from peer",
       OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2,
       &lcp_wantoptions[0].chap_mdtype },
+    { "ms-ignore-domain", o_bool, &ms_ignore_domain,
+      "Ignore any MS domain prefix in the username", 1 },
 #endif
 
     { "refuse-pap", o_bool, &refuse_pap,
diff -uNra ppp-2.4.2/pppd/chap-new.c ppp-2.4.2-new/pppd/chap-new.c
--- ppp-2.4.2/pppd/chap-new.c	Thu Nov 27 22:22:36 2003
+++ ppp-2.4.2-new/pppd/chap-new.c	Sat Dec 20 19:17:42 2003
@@ -396,6 +396,14 @@
 	int ok;
 	char secret[MAXSECRETLEN];
 	int secret_len;
+#ifdef CHAPMS
+	char nametmp[MAXNAMELEN];
+
+	if (ms_ignore_domain && strrchr(name, '\\')) {
+		strcpy(nametmp, strrchr(name, '\\') + 1);
+		strcpy(name, nametmp);
+	}
+#endif
 
 	/* Get the secret that the peer is supposed to know */
 	if (!get_secret(0, name, ourname, secret, &secret_len, 1)) {
diff -uNra ppp-2.4.2/pppd/pppd.h ppp-2.4.2-new/pppd/pppd.h
--- ppp-2.4.2/pppd/pppd.h	Mon Apr  7 01:01:46 2003
+++ ppp-2.4.2-new/pppd/pppd.h	Sat Dec 20 18:58:23 2003
@@ -310,6 +310,10 @@
 extern bool	dump_options;	/* print out option values */
 extern bool	dryrun;		/* check everything, print options, exit */
 
+#ifdef CHAPMS
+extern bool	ms_ignore_domain; /* Ignore any MS domain prefix */
+#endif
+
 #ifdef MAXOCTETS
 extern unsigned int maxoctets;	     /* Maximum octetes per session (in bytes) */
 extern int       maxoctets_dir;      /* Direction :
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin