Skip site navigation (1)Skip section navigation (2)
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:   bin/6314: /usr/sbin/ac modification
Message-ID:  <AAp2yCrOP6@wo3001.uucp>

next in thread | raw e-mail | index | archive | help

>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:
<Organization of PR author (multiple lines)>
>Release:        FreeBSD 2.2.5-RELEASE i386
>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













>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AAp2yCrOP6>