Bug 474896 - add utempter support to screen
add utempter support to screen
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: screen (Show other bugs)
5.3
All Linux
high Severity high
: rc
: ---
Assigned To: Miroslav Lichvar
BaseOS QE
: ZStream
Depends On:
Blocks: 499522 541875
  Show dependency treegraph
 
Reported: 2008-12-05 15:34 EST by Issue Tracker
Modified: 2011-01-13 18:46 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
During a screen session, running certain commands such as "who am i", "w", or "logname" as a superuser did not produce the expected output or failed. This was caused by the fact that the package was built without the utempter support. With this update, the utility has been updated to include this support, and the above commands now work as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 18:46:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to add utempter support (455 bytes, patch)
2008-12-05 15:41 EST, Jeff Bastian
no flags Details | Diff

  None (edit)
Description Issue Tracker 2008-12-05 15:34:02 EST
Escalated to Bugzilla from IssueTracker
Comment 1 Issue Tracker 2008-12-05 15:34:03 EST
Description of problem:
In RHEL 5.2, freshly installed x86_64 system
  - inside a screen session
  - su to root
Issue commands such as logname, "who am i", w
Responses (respectively) are an error, nothing, info is lacking.

How reproducible:

Steps to Reproduce:

Actual results: See attached PDF

Expected results: See attached PDF. 

Additional info:
I have been told that this was also broken and subsequently fixed in Fedora 8.
This event sent from IssueTracker by jbastian  [SEG - Desktop]
 issue 244829
Comment 3 Issue Tracker 2008-12-05 15:34:05 EST
Rob,
Chris and I reproduced this.  "who am i" with spaces doesn't work,
"whoami" without spaces will at least tell you your username.  Without
screen, "who am i" works as advertised.


This event sent from IssueTracker by jbastian  [SEG - Desktop]
 issue 244829
Comment 4 Issue Tracker 2008-12-05 15:34:07 EST
64-bit


Linux dhcp243-234.rdu.redhat.com 2.6.18-92.1.13.el5xen #1 SMP Thu Sep 4
04:07:08 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux


$ whoami
test
$ who am i
test     pts/2        2008-12-03 11:05 (dhcp243-116.rdu.redhat.com)
$ screen

$ who am i
$ whoami
test
$ su -
Password: 
# who am i
# whoami
root




If I 'su' to root before going into the screen command:


$ su -
Password: 
# who am i
test     pts/2        2008-12-03 11:05 (dhcp243-116.rdu.redhat.com)
# whoami
root
# screen


# who am i
root     pts/4        2008-12-03 11:07 (dhcp243-116:S.0)
[root@dhcp243-234 ~]# whoami
root











This event sent from IssueTracker by jbastian  [SEG - Desktop]
 issue 244829
Comment 5 Issue Tracker 2008-12-05 15:34:08 EST
My gut feeling is that screen is not updating the utmp/wtmp records.

RHEL5 had similar problems with xterm:
  https://bugzilla.redhat.com/show_bug.cgi?id=222847
  https://bugzilla.redhat.com/show_bug.cgi?id=309691



This event sent from IssueTracker by jbastian  [SEG - Desktop]
 issue 244829
Comment 6 Issue Tracker 2008-12-05 15:34:09 EST
My gut feeling was correct!

I re-built screen to add libutempter support, and upgraded to
libutempter-1.1.4-4.el5 (to fix a problem with setuid/setgid requirements)
and now 'who am i' works in screen:

[jbastian@dhcp-176-37 ~]$ whoami
jbastian
[jbastian@dhcp-176-37 ~]$ who am i
jbastian pts/1        2008-12-05 20:33 (dhcp-176-117.dfw.redhat.com)
[jbastian@dhcp-176-37 ~]$ screen
[jbastian@dhcp-176-37 ~]$ whoami
jbastian
[jbastian@dhcp-176-37 ~]$ who am i
jbastian pts/2        2008-12-05 20:34 (:pts/1:S.0)



This event sent from IssueTracker by jbastian  [SEG - Desktop]
 issue 244829
Comment 7 Jeff Bastian 2008-12-05 15:41:03 EST
Created attachment 325904 [details]
patch to add utempter support

From Fedora 10's screen changelog:
   * Tue Feb 26 2008 Miroslav Lichvar <mlichvar@redhat.com> - 4.0.3-10
   ...                                      
   - enable utempter support                                          

The only relevant change was adding libutempter-devel to the BuildRequires line in the spec file.  (The configure script does the rest automatically.)
Comment 14 RHEL Product and Program Management 2009-03-26 13:18:30 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 26 Jaromir Hradilek 2010-12-03 09:34:21 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
During a screen session, running certain commands such as "who am i", "w", or "logname" as a superuser did not produce the expected output or failed. This was caused by the fact that the package was built without the utempter support. With this update, the utility has been updated to include this support, and the above commands now work as expected.
Comment 28 errata-xmlrpc 2011-01-13 18:46:33 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0118.html

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