From owner-svn-src-head@FreeBSD.ORG Sun Dec 27 22:26:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993E81065679; Sun, 27 Dec 2009 22:26:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A2A58FC17; Sun, 27 Dec 2009 22:26:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBRMQTuB069324; Sun, 27 Dec 2009 22:26:29 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBRMQTu8069322; Sun, 27 Dec 2009 22:26:29 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912272226.nBRMQTu8069322@svn.freebsd.org> From: Ed Schouten Date: Sun, 27 Dec 2009 22:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201064 - head/lib/libulog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Dec 2009 22:26:29 -0000 Author: ed Date: Sun Dec 27 22:26:29 2009 New Revision: 201064 URL: http://svn.freebsd.org/changeset/base/201064 Log: Parse DEAD_PROCESS entries properly. The TTY line name should always be set for DEAD_PROCESS entries right now. When we parse a clean utmp entry, we don't want to interpret it as a DEAD_PROCESS entry if the TTY has never been used yet. Modified: head/lib/libulog/ulog_getutxent.c Modified: head/lib/libulog/ulog_getutxent.c ============================================================================== --- head/lib/libulog/ulog_getutxent.c Sun Dec 27 22:13:19 2009 (r201063) +++ head/lib/libulog/ulog_getutxent.c Sun Dec 27 22:26:29 2009 (r201064) @@ -71,7 +71,7 @@ ulog_futmp_to_utmpx(const struct futmp * utx->ut_type = NEW_TIME; else if (MATCH(user, "shutdown") && MATCH(line, "~")) utx->ut_type = SHUTDOWN_TIME; - else if (MATCH(user, "") && MATCH(host, "")) { + else if (MATCH(user, "") && MATCH(host, "") && !MATCH(line, "")) { utx->ut_type = DEAD_PROCESS; /* XXX: ut_id and ut_pid missing. ut_line not needed. */ COPY_STRING(line);