X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=92fe82d9cac8e56fc64405a4c1f3641ecc951f36;hp=8a8b2fb83d44a4a74c6b0c5a2778291687340c8a;hb=f482dc10721044d7ffe4cbc2e78f7ea93b1040e0;hpb=637346ba24c289c5a0485651c05baa3f7c22a6b8 diff --git a/pppd/auth.c b/pppd/auth.c index 8a8b2fb..92fe82d 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -68,7 +68,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: auth.c,v 1.101 2004/11/12 10:30:51 paulus Exp $" +#define RCSID "$Id: auth.c,v 1.104 2005/07/09 05:49:44 paulus Exp $" #include #include @@ -532,9 +532,12 @@ void link_required(unit) int unit; { + char *msg; + new_phase(PHASE_SERIALCONN); devfd = the_channel->connect(); + msg = "Connect script failed"; if (devfd < 0) goto fail; @@ -547,6 +550,7 @@ link_required(unit) * gives us. Thus we don't need the tdb_writelock/tdb_writeunlock. */ fd_ppp = the_channel->establish_ppp(devfd); + msg = "ppp establishment failed"; if (fd_ppp < 0) { status = EXIT_FATAL_ERROR; goto disconnect; @@ -580,7 +584,6 @@ link_required(unit) new_phase(PHASE_DEAD); if (the_channel->cleanup) (*the_channel->cleanup)(); - } /* @@ -1648,6 +1651,7 @@ plogin(user, passwd, msg) static void plogout() { + char *tty; #ifdef USE_PAM int pam_error; @@ -1658,14 +1662,12 @@ plogout() } /* Apparently the pam stuff does closelog(). */ reopen_log(); -#else /* ! USE_PAM */ - char *tty; +#endif /* USE_PAM */ tty = devnam; if (strncmp(tty, "/dev/", 5) == 0) tty += 5; logwtmp(tty, "", ""); /* Wipe out utmp logout entry */ -#endif /* ! USE_PAM */ logged_in = 0; }