]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/auth.c
Clear the wtmp entry in plogout whether or not USE_PAM is defined,
[ppp.git] / pppd / auth.c
index f34be0e4c57ccb27217b25169f04bacb01e4ad28..92fe82d9cac8e56fc64405a4c1f3641ecc951f36 100644 (file)
@@ -68,7 +68,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: auth.c,v 1.102 2004/12/31 11:58:56 paulus Exp $"
+#define RCSID  "$Id: auth.c,v 1.104 2005/07/09 05:49:44 paulus Exp $"
 
 #include <stdio.h>
 #include <stddef.h>
@@ -584,9 +584,6 @@ link_required(unit)
     new_phase(PHASE_DEAD);
     if (the_channel->cleanup)
        (*the_channel->cleanup)();
-
-    /* XXX not nice here but needs to go somewhere... */
-    lcp_close(0, msg);
 }
 
 /*
@@ -1654,6 +1651,7 @@ plogin(user, passwd, msg)
 static void
 plogout()
 {
+    char *tty;
 #ifdef USE_PAM
     int pam_error;
 
@@ -1664,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;
 }