Bug 470377 - bash logout hangs if ncurses isn't installed
bash logout hangs if ncurses isn't installed
Status: CLOSED DUPLICATE of bug 469390
Product: Fedora
Classification: Fedora
Component: rootfiles (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-06 17:23 EST by Chris Snook
Modified: 2009-01-06 10:01 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-06 10:01:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Snook 2008-11-06 17:23:44 EST
Description of problem:
For security reasons, it was decided a few releases ago that .bash_logout should invoke /usr/bin/clear.  Unfortunately, if invoking this fails, the logout can hang, making it impossible to log in again.  For a box attached exclusively via serial console (routine in some lab environments), this can make the system inaccessible.

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

How reproducible:

Steps to Reproduce:
1. Install a KVM guest using a kickstart with an empty %packages section and a bootloader --location=mbr --append="console=ttyS0" directive.
2. Boot the guest and connect to its serial console.
3. Log in.
4. hit ctrl-d to logout

Actual results:
Bash complains that /usr/bin/clear is not found, and sometimes hangs without terminating or accepting further input.  If the connection was through SSH, the session may hang until the user kills it with an escape sequence or by killing the window containing it on the client side.

Expected results:
Bash always exits gracefully, allowing ssh sessions to close and gettys to respawn.

Additional info:
This is trivially fixed by making bash depend on ncurses, though it would be preferable in the long term to fix the root cause without introducing that dependency.
Comment 1 David Timms 2008-11-08 02:58:49 EST
I did a default package selection ie no customization install [F10 Preview]. This doesn't install ncurses, and I suggest will lead to common visibility of this issue.

$ su -
# exit
-bash: clear: command not found
an alternative could be adding ncurses to the lowest level comps group ?
Comment 2 Bug Zapper 2008-11-25 23:55:31 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
Comment 3 Roman Rakus 2009-01-06 09:53:15 EST
It's because we have `clear' in .bash_logout. I see it only for root. This file for root belongs to rootfiles. I will change component to this. Maybe we should get a rid of `clear' in .bash_logout or add dependency (rootfiles depends on ncurses).
Comment 4 Ondrej Vasik 2009-01-06 10:01:46 EST
Already fixed in rootfiles-8.1-2.fc11 , ncurses dependency added. For F-10 final, there is existing requirement for ncurses from coreutils/bash, so I guess updating rootfiles just to add dependency is not necessary. Feel free to reopen it, if you think that F-10 rootfiles update is required.

*** This bug has been marked as a duplicate of bug 469390 ***

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