Bug 506790 - use of builtin return in user .profile causes problems
Summary: use of builtin return in user .profile causes problems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ksh
Version: 5.3
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-18 16:48 UTC by Andy Feldt
Modified: 2010-03-30 08:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:22:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0234 0 normal SHIPPED_LIVE ksh bug fix and enhancement update 2010-03-29 12:39:06 UTC

Description Andy Feldt 2009-06-18 16:48:03 UTC
Description of problem:
A user who has a .profile file which executes the ksh builtin 'return' is able to log in, but is unable to properly execute some programs (vim and su at least).

Version-Release number of selected component (if applicable):
ksh-20080202-2.el5.x86_64

How reproducible:
Fails every time following the steps below.

Steps to Reproduce:
1.Create test account with /bin/ksh as the default shell
2.Create a .profile file for this account with a single line containing 'return'
3.Log into this account remotely via SSH
4.Type 'su - somevalidusername'
  
Actual results:
Password: 
su: incorrect password

There is no chance to even enter a password - the error appears immediately

Expected results:

The ability to actually enter the password

Additional info:

Note that another fallout of this is that one can login to the
test account set up as above and type 'vi somefilename' and
the moment you enter a keypress after that the vi session exits.

The initial discovery came from a user who had return statements
based on testing for environment variables so that he could log
into a variety of OSes using the same .profile file.

Comment 1 Michal Hlavinka 2009-07-02 12:15:54 UTC
this problem is present even in recent ksh upstream version (2009-06-30). I've send them an email, waiting for response.

Comment 2 Michal Hlavinka 2009-08-11 12:27:18 UTC
status update: I've reported this bug upstream (2.7.). Got no response, but
this is usual for ksh upstream. They usually don't reply, instead they release
new version containing the fix. waiting for their response or new release

Comment 7 errata-xmlrpc 2010-03-30 08:22:25 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-2010-0234.html


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