Bug 506790 - use of builtin return in user .profile causes problems
use of builtin return in user .profile causes problems
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ksh (Show other bugs)
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Michal Hlavinka
Depends On:
  Show dependency treegraph
Reported: 2009-06-18 12:48 EDT by Andy Feldt
Modified: 2010-03-30 04:22 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:22:25 EDT
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 Andy Feldt 2009-06-18 12:48:03 EDT
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):

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:
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 08:15:54 EDT
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 08:27:18 EDT
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 04:22:25 EDT
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.


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