Bug 470377 - bash logout hangs if ncurses isn't installed
Summary: bash logout hangs if ncurses isn't installed
Keywords:
Status: CLOSED DUPLICATE of bug 469390
Alias: None
Product: Fedora
Classification: Fedora
Component: rootfiles
Version: 10
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-06 22:23 UTC by Chris Snook
Modified: 2009-01-06 15:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-06 15:01:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chris Snook 2008-11-06 22:23:44 UTC
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):
bash-3.2-29.fc10.x86_64

How reproducible:
sometimes

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 07:58:49 UTC
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
logout
-bash: clear: command not found
$
=====
an alternative could be adding ncurses to the lowest level comps group ?

Comment 2 Bug Zapper 2008-11-26 04:55:31 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Roman Rakus 2009-01-06 14:53:15 UTC
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 15:01:46 UTC
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.