| Summary: | /var/log/wtmp is not updated on logout | ||
|---|---|---|---|
| Product: | Base System | Reporter: | christian |
| Component: | bin | Assignee: | ru <ru> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
christian
2001-05-21 02:30:01 UTC
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
Responsible Changed From-To: freebsd-bugs->ru Ruslan Ermilov <ru@FreeBSD.org> committed a change which apparently resolves this PR. I'm passing it on to him to decide if this PR can be closed. State Changed From-To: open->closed last(1) patch has been committed. The remnants of this PR are duplicate of PR bin/17830. |