Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2001 03:20:03 -0700 (PDT)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/27482: /var/log/wtmp is not updated on logout
Message-ID:  <200105211020.f4LAK3I87657@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/27482; it has been noted by GNATS.

From: Ruslan Ermilov <ru@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/27482: /var/log/wtmp is not updated on logout
Date: Mon, 21 May 2001 13:17:14 +0300

 The following patch fixes at least the case where you:
 
 1.  login to a tty (1st wtmp `login' mark is then made)
 2.  execute /usr/bin/login and login again (2nd wtmp `login' mark)
 3.  leave the second login (wtmp `logout' mark isn't written)
 
 Index: last.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/last/last.c,v
 retrieving revision 1.10.6.2
 diff -u -p -r1.10.6.2 last.c
 --- last.c	2001/03/04 08:39:25	1.10.6.2
 +++ last.c	2001/05/21 10:10:35
 @@ -309,13 +309,10 @@ wtmp()
  							    delta / 86400, width, width, ct + 11);
  						}
  					}
 -					LIST_REMOVE(tt, list);
 -					free(tt);
  					if (maxrec != -1 && !--maxrec)
  						return;
 -				} else {
 -					tt->logout = bp->ut_time;
  				}
 +				tt->logout = bp->ut_time;
  			}
  		}
  	}
 
 This was first "broken" in last.c, rev.1.3.
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105211020.f4LAK3I87657>