From nobody  Wed Jul  1 05:33:20 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id FAA10664;
          Wed, 1 Jul 1998 05:33:20 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199807011233.FAA10664@hub.freebsd.org>
Date: Wed, 1 Jul 1998 05:33:20 -0700 (PDT)
From: tarush@mindspring.com
To: freebsd-gnats-submit@freebsd.org
Subject: /usr/sbin/ac (run from /etc/monthly) ignores logins on ttyv*, reports 0.0
X-Send-Pr-Version: www-1.0

>Number:         7137
>Category:       bin
>Synopsis:       /usr/sbin/ac (run from /etc/monthly) ignores logins on ttyv*, reports 0.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul  1 05:40:01 PDT 1998
>Closed-Date:    Wed Jul 1 22:34:17 PDT 1998
>Last-Modified:  Sun Jul  5 13:40:05 PDT 1998
>Originator:     Tom Rush
>Release:        2.2.5-RELEASE
>Organization:
>Environment:
FreeBSD fbsd.rush.net 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #19: Thu Jun 25 14:52:27 EDT 1998     tarush@fbsd.rush.net:/usr/src/sys/compile/AC4WQ  i386
>Description:
/var/log/wtmp entries for ptys are treated differently in ac, since
they may not be logins.  The code for determining whether it is a pty
entry is broken.

I have checked -current, the problem is still there.
>How-To-Repeat:
Just run "ac".
>Fix:
This patch is for the file in -current:

506c506
<                        * if they came in on tty[p-y]*, then it is only
---
>                        * if they came in on tty[p-sP-S]*, then it is only
511c511
<                                   strchr("pqrstuvwxy", usr.ut_line[3]) == 0 ||
---
>                                   strchr("pqrsPQRS", usr.ut_line[3]) == 0 ||
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Jul 1 22:34:17 PDT 1998 
State-Changed-Why:  
fixed in -current, thatnks! 

From: Niall Smart <rotel@indigo.ie>
To: Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc: tarush@mindspring.com, freebsd-gnats-submit@freebsd.org
Subject: Re: bin/7137
Date: Sun, 5 Jul 1998 18:15:53 +0000

 On Jul 2,  9:20pm, Poul-Henning Kamp wrote:
 } Subject: Re: bin/7137
 > 
 > You yell and bicker about somebody who actually DOES something,
 > rather than go home, test the patch on -stable and supply an 
 > independent confirmation that it is OK.
 
 I was yelling and bickering about PR's which still apply to -stable
 being closed, anyway, the patch works unmodified on -stable:
 
 Index: ac.c
 ===================================================================
 RCS file: /cvs/src/usr.sbin/ac/ac.c,v
 retrieving revision 1.4.2.4
 diff -C2 -r1.4.2.4 ac.c
 *** ac.c	1998/06/04 21:44:32	1.4.2.4
 --- ac.c	1998/07/05 17:15:34
 ***************
 *** 504,513 ****
   		default:
   			/*
 ! 			 * if they came in on tty[p-y]*, then it is only
   			 * 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 ||
   				    *usr.ut_host != '\0')
   					head = log_in(head, &usr);
 --- 504,513 ----
   		default:
   			/*
 ! 			 * if they came in on tty[p-sP-S]*, then it is only
   			 * a login session if the ut_host field is non-empty
   			 */
   			if (*usr.ut_name) {
   				if (strncmp(usr.ut_line, "tty", 3) != 0 ||
 ! 				    strchr("pqrsPQRS", usr.ut_line[3]) == 0 ||
   				    *usr.ut_host != '\0')
   					head = log_in(head, &usr);
 
 
 
 > I don't care what size patch it is, I don't commit to -stable without
 > testing it, and since I don't have a machine nor time to do so, I don't
 > commit to -stable.
 
 Then don't close the PR's, mark them suspended and prefix the
 synopsis to [MFC] or [STABLE] or something.
 
 Niall
 
 -- 
 Niall Smart.        PGP: finger njs3@motmot.doc.ic.ac.uk
 FreeBSD: Turning PC's into Workstations: www.freebsd.org
>Unformatted:
