From nobody@FreeBSD.org  Mon Oct  2 04:45:05 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0345116A403
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Oct 2006 04:45:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B709C43D46
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Oct 2006 04:45:04 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k924j4ag045585
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Oct 2006 04:45:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k924j4Ai045584;
	Mon, 2 Oct 2006 04:45:04 GMT
	(envelope-from nobody)
Message-Id: <200610020445.k924j4Ai045584@www.freebsd.org>
Date: Mon, 2 Oct 2006 04:45:04 GMT
From: rich winkel <rich@math.missouri.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: w doesn't see sessreg'd entries in utmp
X-Send-Pr-Version: www-2.3

>Number:         103890
>Category:       bin
>Synopsis:       w(1) doesn't see sessreg'd entries in utmp
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 02 04:50:19 GMT 2006
>Closed-Date:    
>Last-Modified:  Thu May 21 14:50:04 UTC 2009
>Originator:     rich winkel
>Release:        6.1-release-p7
>Organization:
univ of mo
>Environment:
FreeBSD godel 6.1-RELEASE-p7 FreeBSD 6.1-RELEASE-p7 #0: Sun Oct  1 18:12:44 CDT 2006     root@temp:/usr/obj/usr/src/sys/gx270  i386

>Description:
sessreg invoked by xdm's GiveConsole script:

sessreg -a -l $DISPLAY -x /usr/X11/lib/X11R6/xdm/Xservers $USER

With "adam" logged in via X11, "who" says:

root             ttyp5    Oct  1 23:30 (128.206.49.45)
adam             :0       Oct  1 22:36 
adam             :0       Oct  1 22:36 

but "w" says:

11:42PM  up  3:35, 1 user, load averages: 0.00, 0.00, 0.00
USER             TTY      FROM              LOGIN@  IDLE WHAT
root             p5       temp.math.missou 11:30PM     - w


>How-To-Repeat:
see above
>Fix:

>Release-Note:
>Audit-Trail:

From: Andrew <andrew@ugh.net.au>
To: bug-followup@freebsd.org, rich@math.missouri.edu
Cc:  
Subject: Re: bin/103890: w(1) doesn't see sessreg'd entries in utmp
Date: Fri, 22 May 2009 01:23:41 +1000 (EST)

 The problem is the tty or line name that sessreg inserts into utmp isn't a 
 device in /dev. That causes ttystat to fail and so the entry to be 
 skipped. It would probably be easy enough to cope with this and print out 
 the tty as - with no idle time or something if it is felt that would be a 
 correct solution.
 
 HTH,
 
 Andrew
>Unformatted:
