NetBSD Problem Report #669
From gnats Sat Dec 31 20:20:17 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id UAA03676 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 31 Dec 1994 20:20:16 -0800
Message-Id: <199501010127.MAA01032@zen.void.oz.au>
Date: Sun, 1 Jan 1995 12:27:07 +1100
From: "Simon J. Gerraty" <sjg@zen.void.oz.au>
Reply-To: sjg@zen.void.oz.au
To: gnats-bugs@netbsd.org
Subject: ac(8) does not correctly handle i386 console logins
X-Send-Pr-Version: 3.2
>Number: 669
>Category: bin
>Synopsis: ac(8) ignores logins on ttyv* (i386 console)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 31 20:35:03 +0000 1994
>Closed-Date: Thu Sep 26 19:12:14 +0000 1996
>Last-Modified: Thu Sep 26 19:12:35 +0000 1996
>Originator: Simon J. Gerraty
>Release: 1.0
>Organization:
Zen Programming...
>Environment:
System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #6: Tue Dec 13 09:55:20 EST 1994 root@zen.void.oz.au:/usr/src/sys/arch/i386/compile/ZEN i386
>Description:
With NetBSD-1.0, console logins on i386 are on device ttyv0 this
breaks a check in ac.c which should _probably_ only apply if
CONSOLE_TTY is defined.
>How-To-Repeat:
Login on console, then run ac -p, the user on the console
(ttyv0) will not show up in the report.
>Fix:
*** ac.c.~1~ Sun May 1 21:41:29 1994
--- ac.c Sun Jan 1 12:15:30 1995
***************
*** 503,511 ****
* 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);
} else
head = log_out(head, &usr);
--- 503,522 ----
* a login session if the ut_host field is non-empty
*/
if (*usr.ut_name) {
! #ifdef CONSOLE_TTY
! /*
! * We need to check for Console logins
! * explicitly as on i386 ttyv0 is the
! * console so fails the subsequent
! * checks.
! * --sjg
! */
! if (strncmp(usr.ut_line, Console,
! sizeof (usr.ut_line)) == 0 ||
! strncmp(usr.ut_line, "tty", 3) != 0 ||
strchr("pqrstuvwxy", usr.ut_line[3]) == 0 ||
*usr.ut_host != '\0')
+ #endif
head = log_in(head, &usr);
} else
head = log_out(head, &usr);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: christos
State-Changed-When: Thu Sep 26 15:12:14 EDT 1996
State-Changed-Why:
Fixed, but differently
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.