From Fedor.Snegov@pobox.spbu.ru  Wed Apr 15 21:10:59 1998
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 <FreeBSD-gnats-submit@freebsd.org>; 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: <AAp2yCrOP6@wo3001.uucp>
Date: Wed, 15 Apr 98 00:01:55 +0400
From: "Feodor M. Snegov" <Fedor.Snegov@pobox.spbu.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: fedor@doors.ptc.spbu.ru
Subject: /usr/sbin/ac modification

>Number:         6314
>Category:       bin
>Synopsis:       [PATCH] /usr/sbin/ac modification
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 15 14:20:01 PDT 1998
>Closed-Date:    Sun Aug 5 02:43:12 PDT 2001
>Last-Modified:  Sun Aug 05 02:43:59 PDT 2001
>Originator:     Fedor Snegov
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
<Organization of PR author (multiple lines)>
>Environment:

        <Relevant environment information (multiple lines)>

>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













>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Tue May 19 23:06:13 PDT 1998 
State-Changed-Why:  
awaiting committer 
State-Changed-From-To: suspended->closed 
State-Changed-By: jon 
State-Changed-When: Sun Aug 5 02:43:12 PDT 2001 
State-Changed-Why:  
Same as PR bin/4204, fix committed to -CURRENT. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=6314 
>Unformatted:
 >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)
 
 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
 
 
