* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: auth.c,v 1.59 1999/11/20 05:11:01 paulus Exp $"
+#define RCSID "$Id: auth.c,v 1.63 2000/04/04 07:06:49 paulus Exp $"
#include <stdio.h>
#include <stddef.h>
struct wordlist **paddrs,
struct wordlist **popts)) = NULL;
+/* Hook for a plugin to know about the PAP user logout */
+void (*pap_logout_hook) __P((void)) = NULL;
+
/* Hook for a plugin to get the PAP password for authenticating us */
int (*pap_passwd_hook) __P((char *user, char *passwd)) = NULL;
{
if (phase == PHASE_DEAD)
return;
- if (logged_in)
- plogout();
+ if (pap_logout_hook) {
+ pap_logout_hook();
+ } else {
+ if (logged_in)
+ plogout();
+ }
new_phase(PHASE_DEAD);
notice("Connection terminated.");
}
struct protent *protp;
new_phase(PHASE_NETWORK);
+
+#ifdef HAVE_MULTILINK
+ if (multilink)
+ if (mp_join_bundle())
+ return;
+#endif /* HAVE_MULTILINK */
+
#if 0
if (!demand)
set_filters(&pass_filter, &active_filter);
namelen = sizeof(peer_authname) - 1;
BCOPY(name, peer_authname, namelen);
peer_authname[namelen] = 0;
- script_setenv("PEERNAME", peer_authname);
+ script_setenv("PEERNAME", peer_authname, 0);
/*
* If there is no more authentication still to be done,
}
if (auth_required)
return 0; /* no addresses authorized */
- return allow_any_ip || !have_route_to(addr);
+ return allow_any_ip || privileged || !have_route_to(addr);
}
static int