From owner-freebsd-bugs Wed Apr 15 14:20:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA16824 for freebsd-bugs-outgoing; Wed, 15 Apr 1998 14:20:12 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA16792; Wed, 15 Apr 1998 14:20:05 -0700 (PDT) (envelope-from gnats) Received: from doors.ptc.spbu.ru (uucp@doors.ptc.spbu.ru [195.19.225.248]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA15120 for ; Wed, 15 Apr 1998 21:10:35 GMT (envelope-from Fedor.Snegov@pobox.spbu.ru) Received: from wo3001.UUCP (uucp@localhost) by doors.ptc.spbu.ru (8.8.8/8.8.7/OL.cf-3.0beta) with UUCP id BAA18176 for FreeBSD-gnats-submit@freebsd.org; Thu, 16 Apr 1998 01:10:22 +0400 (MSD) Received: by wo3001.uucp (UUPC/@ v7.00, 07Jan97) id AA27636; Wed, 15 Apr 1998 00:01:59 +0400 (MSD) Message-Id: Date: Wed, 15 Apr 98 00:01:55 +0400 From: "Feodor M. Snegov" To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: fedor@doors.ptc.spbu.ru Subject: bin/6314: /usr/sbin/ac modification Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6314 >Category: bin >Synopsis: /usr/sbin/ac modification >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 15 14:20:01 PDT 1998 >Last-Modified: >Originator: Fedor Snegov >Organization: >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: >Description: ac command from this distribution does not give actual connection time from local or other terminals. It shows only 0.00 with wtmp file having many actual login and logout records with non zero connection time >How-To-Repeat: >Fix: This is a diff program output with -u key to fix problem with total connection time gathering --- /usr/src/usr.sbin/ac/ac.c Tue Sep 2 10:28:56 1997 +++ /root/prog/ac.new/ac.c Wed Apr 15 12:17:34 1998 @@ -507,8 +507,8 @@ * a login session if the ut_host field is non-empty */ if (*usr.ut_name) { - if (strncmp(usr.ut_line, "tty", 3) != 0 || - strchr("pqrstuvwxy", usr.ut_line[3]) == 0 || + if (strncmp(usr.ut_line, "tty", 3) == 0 || + strchr("pqrstuvwxy", usr.ut_line[3]) != NULL || *usr.ut_host != '\0') head = log_in(head, &usr); } else >Audit-Trail: >Unformatted: SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo SEND-PR: manual if you are not sure how to fill out a problem report. SEND-PR: SEND-PR: Note that the Synopsis field is mandatory. The Subject (for SEND-PR: the mail) will be made the same as Synopsis unless explicitly SEND-PR: changed. SEND-PR: SEND-PR: Choose from the following categories: SEND-PR: SEND-PR: bin conf docs gnu i386 kern misc ports SEND-PR: To: FreeBSD-gnats-submit@freebsd.org Subject: From: fedor Reply-To: Fedor.Snegov@pobox.spbu.ru X-send-pr-version: 3.2 >eHow-To-Repeat: try command: ac -t "ttyv*" or simply: ac -p The output does not reflects actual total connection time (it outputs everytime total 0.00) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message