[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: PPPD/AUTOPPP and MGETTY problem



This bounced the first time I sent it because I'm subscribed via an
exploder. I hate it when spammers turn the net into such an anal place
you can't speak your opinion without using some freakin authentication
tokens.

Olaf

------- Forwarded Message

On Mon, 07 Dec 1998 10:02:26 +0100, Olaf Kirch wrote:
> 
> --FL5UXtIhxfXey3p5
> Content-Type: text/plain; charset=us-ascii
> 
> --------
> On Sun, 06 Dec 1998 15:57:21 EST, "Ian Redden" wrote:
> > hello, I am having a problem with my PPPD - AutoPPP and I think the =
> > problem is PAM related.  When I dialin remotely with telix and login at =
> > the 'hostname login:' prompt I can enter my username and password fine, =
> > however, when I use windows 9x and connect with AutoPPP with mgetty 1.14 =
> > I get invalid password.   I think the problem is either permissions and =
> > the pppd doesnt allow the user to run it but I have tried all sorts of =
> > permissions.
> 
> Some clients, among them windows boxes, seem to escape the 0xFF character
> even during initial ppp handshake. mgetty, at least version 1.1.8, is not
> equipped to handle this. I'm not sure about more recent versions. Maybe
> Gert can shed some light on this...
> 
> Please try out the patch attached, and let's take this issue off pam-list.
> Last time I looked pam isn't involved in mgetty's autoppp-feature at all.
> 
> Olaf
> -- 
> Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
> okir@monad.swb.de  |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
> 
> --FL5UXtIhxfXey3p5
> Content-Type: application/x-patch
> Content-Disposition: attachment; filename="mgetty1.1.8-autoppp.patch"
> 
> 
> 	This patch makes mgetty auto-detect PPP clients that
> 	escape the 0xFF character even during start-up.
> 	This may not be according to the book, but it seems to
> 	happen nevertheless.
> 
> 	The patch makes sure every HDLC escape sequence is recognized.
> 
> 					--okir
> 
> diff -ur mgetty-1.1.8.orig/logname.c mgetty-1.1.8/logname.c
> --- mgetty-1.1.8.orig/logname.c	Mon Dec 29 11:41:28 1997
> +++ mgetty-1.1.8/logname.c	Mon Dec 29 12:09:55 1997
> @@ -239,7 +239,8 @@
>      char *  final_prompt;
>  
>  #ifdef AUTO_PPP
> -    static int ppp_level = 0;
> +    static int ppp_level = 0, ppp_escaped = 0;
> +    char   ppp_ch;
>  #endif
>      
>      static boolean was_all_uc = FALSE;
> @@ -350,21 +351,28 @@
>             See RFC1662 for more information.
>  
>  	   Contributed by Erik 'PPP' Olson, <eriko@wrq.com>.
> +
> +	   Fix by okir@caldera.de: Recognize any escape sequence
> +	   (some pppd's also escape the 'all stations' byte (0xFF)).
>           */
>  
> -        if (ch == (char) PPP_FRAME) {
> +        ppp_ch = ch;
> +        if (ppp_escaped) {
> +                ppp_ch = PPP_UNESCAPE(ch);
> +                ppp_escaped = 0;
> +        }
> +        if (ppp_ch == (char) PPP_ESCAPE) {
> +            ppp_escaped = 1;
> +        } else if (ppp_ch == (char) PPP_FRAME) {
>              ppp_level = 1;
> -        } else if (ch == (char) PPP_STATION && ppp_level == 1) {
> +        } else if (ppp_ch == (char) PPP_STATION && ppp_level == 1) {
>              ppp_level = 2;
> -        } else if (ch == (char) PPP_ESCAPE && ppp_level == 2) {
> +        } else if (ppp_ch == (char) PPP_CONTROL && ppp_level == 2) {
>              ppp_level = 3;
> -        } else if ((ch == (char) PPP_CONTROL && ppp_level == 2)
> -                   || (ch == (char) PPP_CONTROL_ESCAPED && ppp_level == 3)) 
> {
> -	    ppp_level = 4;
> -	} else if (ch == (char) PPP_LCP_HI && ppp_level == 4) {
> -	    ppp_level = 5;
> -	} else if (ch == (char) PPP_LCP_LOW && ppp_level == 5)
> -	{
> +        } else if (ppp_ch == (char) PPP_LCP_HI && ppp_level == 3) {
> +            ppp_level = 4;
> +        } else if (ppp_ch == (char) PPP_LCP_LOW && ppp_level == 4)
> +        {
>              strcpy (buf, "/AutoPPP/");
>              i=9;
>              ch = '\r';
> @@ -377,6 +385,7 @@
>  	    tio_mode_raw( &tio_save );
>          } else {
>              ppp_level = 0;
> +	    ppp_escaped = 0;
>          }
>  #endif
>          
> diff -ur mgetty-1.1.8.orig/mgetty.h mgetty-1.1.8/mgetty.h
> --- mgetty-1.1.8.orig/mgetty.h	Sat Jun 28 20:40:07 1997
> +++ mgetty-1.1.8/mgetty.h	Mon Dec 29 11:48:53 1997
> @@ -33,13 +33,13 @@
>  
>  /* defines for auto detection of incoming PPP calls (->PAP/CHAP) */
>  
> -#define PPP_FRAME           0x7e  /* PPP Framing character */
> -#define PPP_STATION         0xff  /* "All Station" character */
> -#define PPP_ESCAPE          0x7d  /* Escape Character */ 
> -#define PPP_CONTROL         0x03  /* PPP Control Field */
> -#define PPP_CONTROL_ESCAPED 0x23  /* PPP Control Field, escaped */
> -#define PPP_LCP_HI          0xc0  /* LCP protocol - high byte */
> -#define PPP_LCP_LOW         0x21  /* LCP protocol - low byte */
> +#define PPP_FRAME           0x7e 	 /* PPP Framing character */
> +#define PPP_STATION         0xff 	 /* "All Station" character */
> +#define PPP_ESCAPE          0x7d 	 /* Escape Character */ 
> +#define PPP_CONTROL         0x03 	 /* PPP Control Field */
> +#define PPP_LCP_HI          0xc0 	 /* LCP protocol - high byte */
> +#define PPP_LCP_LOW         0x21 	 /* LCP protocol - low byte */
> +#define PPP_UNESCAPE(c)	    ((c) ^ 0x20) /* un-escape character */
>  
>  /* stuff in logfile.c */
>  
> 
> --FL5UXtIhxfXey3p5--
- -- 
Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
okir@monad.swb.de  |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

------- End of Forwarded Message



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []