Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 223960 - .bash_logout should invoke /usr/bin/clear
Summary: .bash_logout should invoke /usr/bin/clear
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-23 11:04 UTC by Ralf Corsepius
Modified: 2009-03-23 19:19 UTC (History)
1 user (show)

Fixed In Version: 3.2-4.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-23 11:38:25 UTC


Attachments (Terms of Use)

Description Ralf Corsepius 2007-01-23 11:04:37 UTC
Description of problem:
/etc/skel/.bash_logout invokes "clear"

i.e. "clear" is being searched on $PATH.
This breaks if users screw up their $PATH. 

IMO, this should be /usr/bin/clear instead.

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

How reproducible:
Deterministic.

Steps to Reproduce:
1. copy /etc/skel/.bash_logout to $(HOME):
cp /etc/skel/.bash_logout ~

2. Break your $PATH, e.g.
export PATH=/foo/bar:PATH
[A classical typo users trip into when modifying $PATH]

3. logout:
exit
  
Actual results:
> exit
logout
-bash: clear: command not found

Expected results:
Function.

Additional info:
IMO, this also is a security leak. "clear" is a too common name to search for on
$PATH.

Comment 1 Susi Lehtola 2009-03-23 19:19:52 UTC
(In reply to comment #0)
> Additional info:
> IMO, this also is a security leak. "clear" is a too common name to search for on
> $PATH.  

You're right. Even though we can (hopefully) make sure no other package in Fedora has executables named 'clear', there's no guarantee that users don't have such things in their $PATH.

However, not clearing the screen is also a bit of a security risk; I for instance am very satisfied with the screen clearing behaviour of Fedora.


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