Bug 25048

Summary: messed up utmp entry
Product: [Retired] Red Hat Linux Reporter: Tim Waugh <twaugh>
Component: kdebaseAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: high    
Version: 7.1Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: Florence RC-1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-04 12:06:47 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 Tim Waugh 2001-01-26 22:09:27 UTC
Here's a fun one to try.

Create a new user.  Log in as that user via kdm.  Log out.  'finger'.

Here's what I get, for two users I made up:

Login   Name    Tty    Idle
fred          *pts/0    25d
jim           *pts/0    25d

Does anyone else get this?

Comment 1 Tim Waugh 2001-01-29 18:53:29 UTC
Actually, it doesn't seem to happen from kdm, only with startx.

Comment 2 Glen Foster 2001-01-30 00:01:50 UTC
This defect is considered MUST-FIX for Florence Release-Candidate #1

Comment 3 Tim Waugh 2001-01-30 11:43:48 UTC
Okay, the smoking gun is here, in kdebase/konsole/src/kwrited.C:57:

  //FIXME: make sure we properly remove the utmp stamp on session end or kill



Comment 4 Tim Waugh 2001-01-30 11:58:49 UTC
kwrited is getting killed by SIGHUP as soon as I log out.



Comment 5 Tim Waugh 2001-01-30 17:51:13 UTC
*** Bug 25232 has been marked as a duplicate of this bug. ***

Comment 6 Tim Waugh 2001-01-30 18:23:38 UTC
I can't figure this out.  After logging in, kwrited has a child, cat.  kwrited
is in the same process group and session as all the other kdeinit:* processes,
and cat is in its own process group, and its own session.  Only cat has a
controlling terminal.  Yet they _both_ get a SIGHUP, when I can only see one
being sent.  Am I looking in the wrong place?

Also, althought TEPty::TEPty does:

  connect(this, SIGNAL(processExited(KProcess *)),
          this, SLOT(donePty()));

donePty never gets called. :-(

Comment 7 Tim Waugh 2001-02-02 18:52:24 UTC
I've reported this in the KDE bug database.

Comment 8 Tim Waugh 2001-02-04 12:06:43 UTC
Stephan Kulow's patch does not fix the problem.  For reference, this is KDE bug
#19649.

Comment 9 Bernhard Rosenkraenzer 2001-02-04 19:03:12 UTC
Fixed in 2.0.20010204-1

Comment 10 Tim Waugh 2001-02-04 19:07:29 UTC
Bero, are you sure?  The patch you sent me didn't work entirely.

Comment 11 Bernhard Rosenkraenzer 2001-02-04 19:11:15 UTC
I've built a new one that works for me so far.
Seems some **** thought we don't need to chownpty() if we have a /dev/ptmx
device for some reason, commenting out that line fixes it (for me).

Besides the patch I've sent you earlier fixes the utmp issue which is the worse
part (and reasoning for the RC-1-MUSTFIX state ;) ) of the problem.

If the other problem remains for you, please open a new bug rather than
reopening this one.

Comment 12 Tim Waugh 2001-02-04 19:15:14 UTC
I thought the worse part was the device permissions one (#25232).  I'll reopen
it, since it seems to be a separate (kdm) thing.