Date: Sun, 27 Dec 2009 22:26:29 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r201064 - head/lib/libulog Message-ID: <200912272226.nBRMQTu8069322@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912272226.nBRMQTu8069322>