Bug 16971

Summary: Exiting from /usr/sbin/login does not restore utmp
Product: Base System Reporter: Joel Ray Holveck <joelh>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   

Description Joel Ray Holveck 2000-02-24 23:10:01 UTC
	After login exits when invoked from the shell, it does not
restore utmp to indicate the old user.

How-To-Repeat: 
The following has been minorly edited to eliminate motds, etc.
joelh's shell is bash 2.02.  It runs login out of /usr/bin and forks
as if it were running any other program.  The telnet is to force a
clean environment.

detlev$ telnet 127.0.0.1
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.

FreeBSD/i386 (detlev.piqnet.org) (ttypb)

login: joelh
s/key 94 de20359
Password: 
Last login: Thu Feb 24 14:31:14 from localhost
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
	The Regents of the University of California.  All rights reserved.

FreeBSD 4.0-CURRENT (DETLEV) #0: Fri Feb 11 01:37:14 PST 2000
detlev$ tty
/dev/ttypb
detlev$ w | grep pb
joelh            pb       localhost         2:34PM     - grep pb
detlev$ login smt
Password:
Last login: Thu Feb 24 14:31:27 on ttypa
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
	The Regents of the University of California.  All rights reserved.

FreeBSD 4.0-CURRENT (DETLEV) #0: Fri Feb 11 01:37:14 PST 2000
bash-2.02$ w | grep pb
smt             pb       -                 2:34PM     - grep pb
bash-2.02$ logout
detlev$ w | grep pb
smt             pb       -                 2:34PM     - grep pb
detlev$ logout
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2001-10-11 23:13:27 UTC
State Changed
From-To: open->closed

Kind of duplicate of PR 5483.