From f482dc10721044d7ffe4cbc2e78f7ea93b1040e0 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 9 Jul 2005 05:49:44 +0000 Subject: [PATCH] Clear the wtmp entry in plogout whether or not USE_PAM is defined, for symmetry with plogin, which creates it whether or not USE_PAM is defined. --- pppd/auth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pppd/auth.c b/pppd/auth.c index 0f59f7f..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.103 2005/03/21 09:20:16 paulus Exp $" +#define RCSID "$Id: auth.c,v 1.104 2005/07/09 05:49:44 paulus Exp $" #include #include @@ -1651,6 +1651,7 @@ plogin(user, passwd, msg) static void plogout() { + char *tty; #ifdef USE_PAM int pam_error; @@ -1661,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; } -- 2.39.2