[comp.unix.aux] Tiny bug in A/UX 1.0 finger

jjd@bbn.com (James J Dempsey) (07/26/88)

[ Is this an appropriate place to send A/UX bug reports?  Perhaps
Apple should set up an A/UX bug report mailing list.  Perhaps
something like: "bug-aux@apple.apple.com" ]

There is a tiny bug in the A/UX 1.0 finger command.

When given a local user as an argument, it apparently fails to
discriminate between current and dead processes listed in /etc/utmp.

To reproduce:

Boot A/UX multiuser
Login (use your own login name, let's say it is "jjd")
Start toolboxdaemon
Start term (wait till prompt appears on "Terminal 1")
Quit term
finger jjd

The output of the finger command will list "jjd" as being logged in
twice -- once on the console and once on ttyp0 -- which was the
pseudo-terminal that term used (briefly). /bin/who doesn't list the
second user. Finger with no arguments doesn't list the second user.
If you take a look at the utmp file (using some C program), you will
see that the ut_type of the entry on ttyp0 is DEAD_PROCESS.

		--Jim Dempsey--
		BBN Communications
		jjd@bbn.com (ARPA Internet)
                ..!{decvax, harvard, wjh12, linus}!bbn!jjd

pane@cat.cmu.edu (John Pane) (07/27/88)

In article <27425@bbn.COM> jjd@BBN.COM () writes:
>
>There is a tiny bug in the A/UX 1.0 finger command.
>
>When given a local user as an argument, it apparently fails to
>discriminate between current and dead processes listed in /etc/utmp.
>

I don't know if the problem you describe is a bug in finger or a bug in term
(is it ok for term to leave that entry in /etc/utmp?).  I was able to fix it
by adding one line of code to the term program.  After line 106, add:
	utmp.ut_user[0] = '\0';
This has the effect of removing the username from the utmp entry.

John Pane
Department of Computer Science
Carnegie Mellon University
pane@cs.cmu.edu