*/
#ifndef lint
-static char rcsid[] = "$Id: auth.c,v 1.26 1996/08/28 06:39:12 paulus Exp $";
+static char rcsid[] = "$Id: auth.c,v 1.28 1996/10/08 04:35:02 paulus Exp $";
#endif
#include <stdio.h>
#ifdef SVR4
#include <crypt.h>
#else
-#ifdef SUNOS4
+#if defined(SUNOS4) || defined(ULTRIX)
extern char *crypt();
#endif
#endif
#include "ipcp.h"
#include "upap.h"
#include "chap.h"
+#ifdef CBCP_SUPPORT
+#include "cbcp.h"
+#endif
#include "pathnames.h"
-#if defined(sun) && defined(sparc)
-#include <alloca.h>
-#endif /*sparc*/
-
/* Used for storing a sequence of words. Usually malloced. */
struct wordlist {
struct wordlist *next;
struct wordlist **, char *));
static void free_wordlist __P((struct wordlist *));
static void auth_script __P((char *));
+#ifdef CBCP_SUPPORT
+static void callback_phase __P((int));
+#endif
/*
* An Open on LCP has requested a change from Dead to Establish phase.
did_authup = 1;
}
+#ifdef CBCP_SUPPORT
+ /*
+ * If we negotiated callback, do it now.
+ */
+ if (go->neg_cbcp) {
+ phase = PHASE_CALLBACK;
+ (*cbcp_protent.open)(unit);
+ return;
+ }
+#endif
+
phase = PHASE_NETWORK;
#if 0
if (!demand)
/*
* If there is no more authentication still to be done,
- * proceed to the network phase.
+ * proceed to the network (or callback) phase.
*/
if ((auth_pending[unit] &= ~bit) == 0)
network_phase(unit);
/*
* If there is no more authentication still being done,
- * proceed to the network phase.
+ * proceed to the network (or callback) phase.
*/
if ((auth_pending[unit] &= ~bit) == 0)
network_phase(unit);
* could be found.
*/
static int
-get_pap_passwd(char *passwd)
+get_pap_passwd(passwd)
+ char *passwd;
{
char *filename;
FILE *f;