Bug 109243

Summary: utmp file grows
Product: [Retired] Red Hat Linux Reporter: Pete <plst>
Component: util-linuxAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: plst
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-20 20:10:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete 2003-11-06 00:42:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 
Q312461)

Description of problem:
Entries in the /var/run/utmp file are never removed when a user 
logs out and the file continues to grow.  When a user logs out, 
ut_type is set to DEAD_PROCESS and several of the other fields are 
set to NULL but the entry itself remains.  This can be verified
by running utmpdump...  For systems that are not rebooted for
a long time (6-12 months) this file grows very large.  

Is this expected behavior?  If so why? I expect a user's entry to be 
removed when they logout.

I have confirmed this behavior for both telnet and rlogin.

Thanks,

/Pete

Version-Release number of selected component (if applicable):
util-linux-2.11y-9

How reproducible:
Always

Steps to Reproduce:
1.login with either telnet or rlogin
2.utmpdump
3.logout
4.utmpdump
    

Actual Results:  My entry in utmp remained but the value of certain 
fields was changed
as described above.

Expected Results:  My expectation is that the entry would be removed 
when I logout.


Additional info:

Comment 1 Pete 2003-11-07 17:41:37 UTC
After looking into this problem more, I have found that /bin/login
is not re using previous entries in the utmp file for the same tty.
For example, if I login and logout on tty /dev/pts/0 multiple times 
in a row a new entry is added to the end of the utmp file each time.
Looking at login.c this should not happen.  login.c looks
for a matching pid or tty and uses that entry.  What is really
strange is I downloaded the sourse (util-linux-2.11y-9.src.rpm),
compiled a new login and replaced /bin/login with it and the problem
goes away. With the new login, entries are reused if the tty is the
same.   Please advise...and thanks for any help ..... Pete

Comment 2 Elliot Lee 2003-12-17 19:05:48 UTC
Any x86_64 stuff involved here? That's the only explanation I know of.

Comment 3 Pete 2003-12-22 17:55:19 UTC
No this is a 32 bit P4.