From owner-cvs-src@FreeBSD.ORG Mon Mar 8 12:02:24 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2266216A4CF; Mon, 8 Mar 2004 12:02:24 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1130843D31; Mon, 8 Mar 2004 12:02:24 -0800 (PST) (envelope-from gad@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i28K2NGe034057; Mon, 8 Mar 2004 12:02:23 -0800 (PST) (envelope-from gad@repoman.freebsd.org) Received: (from gad@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i28K2NCa034056; Mon, 8 Mar 2004 12:02:23 -0800 (PST) (envelope-from gad) Message-Id: <200403082002.i28K2NCa034056@repoman.freebsd.org> From: Garance A Drosehn Date: Mon, 8 Mar 2004 12:02:23 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/ac ac.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2004 20:02:24 -0000 gad 2004/03/08 12:02:23 PST FreeBSD src repository Modified files: usr.sbin/ac ac.c Log: Add a check for wtmp records which have invalid values for ut_time. Wtmp records with time==0 get "the time of the last valid record", while records where time goes backwards (compared to the previous record) are skipped. Also prints a message saying how many records were changed or skipped due to these checks. Check was inspired by a simpler check in OpenBSD's version. This is all meant to sidestep problems that Tillman Hodgson noticed with 'ac' when running sparc64 with 64-bit time_t's. The real problem is whatever is creating wtmp records with ut_time==0, of course, but I have not yet figured out what is doing that. Reviewed by: no screams from freebsd-sparc64 or bde MFC after: 2 weeks Revision Changes Path 1.29 +64 -12 src/usr.sbin/ac/ac.c