Bug 4009 - screen is unable to login/logout terminals
Summary: screen is unable to login/logout terminals
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: screen
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-13 01:55 UTC by mdharm
Modified: 2014-03-17 02:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-09-21 22:24:08 UTC
Embargoed:


Attachments (Terms of Use)

Description mdharm 1999-07-13 01:55:37 UTC
Screen seems unable to manipulate the /var/run/utmp database
correctly.  It fails to remove the entry for the terminal
from which screen is launched, and screen is unable to
toggle the login status of a screen window.

The relevant packages I have installed:
screen-3.7.6-9
dev-2.7.7-2
utempter-0.5-2

I've examined the src.rpm for screen, and see where it was
patched to make utempter calls to alter the utmp database.
These calls seem to be silently failing.  I've attempted to
recompile screen from the .src.rpm, but the recompiled
version exhibits the exact same behavior.

Please let me know if you need more details about the nature
of this bug.

Matt Dharm

Comment 1 mdharm 1999-07-15 11:58:59 UTC
I've tried playing around with the utempter package, and I can't make
heads or tails of what's supposed to be going on here.  Clearly, when
it operates properly it's supposed to allow modifications to
/var/run/utmp.  But, it tries to impose conditions which I don't
understand.  What's fd 3 for?

Without any understanding, I don't think I can debug this problem any
further.  If someone there would like to send me a document or two, I
might be able to fix this for you.

Matt Dharm

Comment 2 Bill Nottingham 1999-08-31 14:55:59 UTC
This seems to work for me OK with screen-3.9.4-2;
C-a L logs in/logs out the terminal OK; the changes show
up in 'who', 'w', and last.  Does the Raw Hide version
of screen (3.9.4-2) work for you?

------- Additional Comments From   08/31/99 16:07 -------
screen 3.9.4-2 from ftp.redhat.com/rawhide seems to work properly.  I
would suggest placing a copy of that RPM in the updates directory for
RedHat 6.0 also.  Thanks for the help!

Comment 3 Jeff Johnson 1999-08-31 20:25:59 UTC
This problem appears to be resolved.

Comment 4 mdharm 1999-08-31 21:27:59 UTC
Further testing indicates that there is still one bug.  If you're
running screen from a console terminal, it works fine.  However, if
you run it from a remote terminal (i.e. ssh or telnet), it fails to
logout the terminal on which screen is running.  The terminal still
shows up in w, who, finger, and last.  As far as I know, the terminal
should show up in last as still logged in (that was the old behavior,
at least).

Comment 5 Bill Nottingham 1999-09-07 14:07:59 UTC
I can't reproduce this here. I telnet/ssh in, run
screen (which opens ttya0, ttya1, etc.), and these
entries are removed when I quit screen.

Comment 6 mdharm 1999-09-07 21:05:59 UTC
Here is the output of a 'w'.  Other users have been removed from this
listing to clarify the issue and protect security interests.

Note that on pts/6 I'm logged in an running screen.  Under Redhat 5.2
screen would 'logout' the terminal from which screen was invoked.
Thus, only the ttya[a-z] entries would _ever_ be shown, and no listing
of 'who' or 'w' would show me running screen.  I believe this is the
correct behavior.

Note that on ttyab (my first and only screen window) I can login and
logout properly.  This seems to work now that I've updated to
screen-3.9.4-2.  However, the terminal from which screen is invoked
still remains logged in.  To reiterate: All behavior regarding the
ttya[a-z] entries appears to function normally.

I've repeated this on 3 systems now:  A stock RedHat 5.2 upgraded to
6.0, and two machines which are purely 6.0 installations.  All
machines have all updates installed as of 1 September 1999.  I've also
observed this behavior when connecting to the machine via telnet or
ssh.

If you're still having trouble reproducing this bug, I'd be more than
happy to give one of your engineers a temporary account on my system
for testing purposes.

[mdharm:ziggy]:~$ w
  1:57pm  up 56 days, 20:07, 16 users,  load average: 1.00, 1.01, 1.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
mdharm   ttyab    -                 1:57pm  1.00s  0.15s  0.09s  w
mdharm   pts/6    mdharm3.qualcomm  1:57pm  1.00s  0.17s  0.02s screen

Comment 7 Bill Nottingham 1999-09-21 22:24:59 UTC
It's intentional. utempter will not remove utmp entries
that it didn't create...


Note You need to log in before you can comment on or make changes to this bug.