Subject: Re: Politically Correct way of doing password authentication?
To: None <gary@wheel.tiac.net>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: current-users
Date: 09/19/1994 23:26:04
Oh, right, you need this patch for usr.sbin/pppd/chat/chat.c:

===================================================================
RCS file: RCS/chat.c,v
retrieving revision 1.1
diff -c -r1.1 chat.c
*** 1.1	1994/09/02 02:59:02
--- usr.sbin/pppd/chat/chat.c	1994/09/13 02:33:00
***************
*** 873,879 ****
--- 873,881 ----
      {
      int status;
      char c;
+     int rounds = 0;
  
+ again:
      status = read(0, &c, 1);
  
      switch (status)
***************
*** 886,897 ****
  		   status);
  
  	case -1:
! 	    if ((status = fcntl(0, F_GETFL, 0)) == -1)
! 		sysfatal("Can't get file mode flags on stdin");
! 	    else
! 		if (fcntl(0, F_SETFL, status & ~FNDELAY) == -1)
! 		    sysfatal("Can't set file mode flags on stdin");
! 
  	    return (-1);
  	}
      }
--- 888,904 ----
  		   status);
  
  	case -1:
! 	    if (verbose)
! 		syslog(LOG_WARNING, "get_char(): %m");
! 	    if (errno == EWOULDBLOCK) {
! 		if ((status = fcntl(0, F_GETFL, 0)) == -1)
! 		    sysfatal("Can't get file mode flags on stdin");
! 		else
! 		    if (fcntl(0, F_SETFL, status & ~FNDELAY) == -1)
! 			sysfatal("Can't set file mode flags on stdin");
! 		if (rounds++ == 0)
! 		    goto again;
! 	    }
  	    return (-1);
  	}
      }