Bug 474896

Summary: add utempter support to screen
Product: Red Hat Enterprise Linux 5 Reporter: Issue Tracker <tao>
Component: screenAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: cward, cww, jbastian, ofourdan, rvokal, tao
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 23:46:33 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:
Bug Depends On:    
Bug Blocks: 499522, 541875    
Attachments:
Description Flags
patch to add utempter support none

Description Issue Tracker 2008-12-05 20:34:02 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2008-12-05 20:34:03 UTC
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 20:34:05 UTC
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 20:34:07 UTC
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 20:34:08 UTC
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 20:34:09 UTC
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 20:41:03 UTC
Created attachment 325904 [details]
patch to add utempter support

From Fedora 10's screen changelog:
   * Tue Feb 26 2008 Miroslav Lichvar <mlichvar> - 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 Program Management 2009-03-26 17:18:30 UTC
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 14:34:21 UTC
    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 23:46:33 UTC
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