Bug 477753 - Add utempter support to "script"
Add utempter support to "script"
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
Depends On:
Blocks: 490693 586942
  Show dependency treegraph
Reported: 2008-12-23 05:52 EST by Olivier Fourdan
Modified: 2013-03-03 21:47 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 490693 (view as bug list)
Last Closed: 2010-04-29 06:43:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch [1/2] (2.42 KB, patch)
2008-12-23 05:52 EST, Olivier Fourdan
no flags Details | Diff
Patch for the spec file [2/2] (843 bytes, patch)
2008-12-23 06:03 EST, Olivier Fourdan
no flags Details | Diff

  None (edit)
Description Olivier Fourdan 2008-12-23 05:52:31 EST
Created attachment 327747 [details]
Proposed patch [1/2]

Description of problem:

"script" does not update utmp logs so "logname" or "who" do not return the expected results when run from a "script" session.

Version-Release number of selected component (if applicable):


How reproducible:

100% reproducible

Steps to Reproduce:
1. script
2. logname
3. who am i
Actual results:

[ofourdan@host ~]$ script
Script started, file is typescript
[ofourdan@host ~]$ logname
logname: no login name
[ofourdan@host ~]$ who am i
[ofourdan@host ~]$ 

Expected results:

[ofourdan@host ~]$ script
Script started, file is typescript
[ofourdan@host ~]$ logname
[ofourdan@host ~]$ who am i
ofourdan pts/25       2008-12-23 10:45 (host)
[ofourdan@host ~]$ 

Additional info:

This is a corollary of BZ#474896. "script" does update the utmp logs, and tools such as "logname" or "who" use the utmp records and therefore fail to return the expected result when run from a "script" session.

The attached patch adds support for libutempter in "script" so that the utmp records are properly updated.

note: the problem is also upstream so this might need to be reported upstream too.

NB: Also requires libutempter >= 1.1.4-4
Comment 1 Olivier Fourdan 2008-12-23 06:03:13 EST
Created attachment 327749 [details]
Patch for the spec file [2/2]

Also adds BuildRequires for libutempter-devel to the spec file.
Comment 2 Karel Zak 2008-12-23 17:43:36 EST
Good catch, I'll fix the problem in upstream code. It shouldn't be a problem to backport it to RHEL. Thanks.
Comment 3 Karel Zak 2009-01-13 05:24:00 EST
Hmm... I'm not sure if we want to add a new dependence on libutempter to the very basic system package. I think the problem should be resolved by upstream and tested on rawhide.

I have doubts about this change on RHEL. It does not seem as an important problem.

Moving to Fedora and util-linux-ng.
Comment 6 Bug Zapper 2009-06-09 06:28:52 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 7 Bug Zapper 2010-04-27 08:37:01 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 8 Karel Zak 2010-04-29 06:43:20 EDT
The feature has been added to the upstream code, commit f0bc3fa0cf45f484ea696ef063a10b65d1a45e13.

It'll be available in Fedora in the next version update (util-linux-ng 2.18, probably F-14).

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