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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"