Skip to navigation

Bug Fix Advisory ksh bug fix update

Advisory: RHBA-2009:1256-1
Type: Bug Fix Advisory
Severity: N/A
Issued on: 2009-09-02
Last updated on: 2009-09-02
Affected Products: RHEL Desktop Workstation (v. 5 client)
Red Hat Enterprise Linux (v. 5 server)

Details

Ksh package that fixes various bugs is now available.

KSH-93 is the most recent version of the KornShell by David Korn of AT&T
Bell Laboratories -- a shell programming language upwards-compatible with
"sh" (the Bourne Shell).

This updated ksh package includes fixes for the following bugs:

* when umask set a default permission in a subshell, this default
permission would persist after returning to the parent shell. Subsequently,
files in the parent shell might have been created with wrong permissions.
This is now fixed. (BZ#485030)

* ksh removed variables from the environment if their names contained
certain characters, for example, a hyphen or a space. Now, although ksh
does not use environment variables with names that contain these
characters, it keeps them for sub-processes. (BZ#488934)

* the ksh builtins failed to report errors on failed file operations, for
example, if they were unable to write to a file because of no space on a
disk. This could result in data loss, because a user would have no warning
that data was not saved. Builtins now provide a proper return code and
present an error message to the user if they are unable to complete a file
operation. (BZ#465438)

* when typeset was used together with variable assignment in the last
version of ksh, typeset took effect after the assignment, not before.
Because this behavior was the opposite of how typeset works in ksh
versions provided by pdksh and was not documented, it could create surprise
and confusion. Now, ksh changed its behavior and typeset takes
effect before the variable assignment. (BZ#489516)

* the ksh package now includes 'alternatives' which allows ksh switching
with PDKSH. This feature allows users to switch between the ksh-93 and
ksh-88 shells and to port ksh-88 scripts to ksh-93. (BZ#488798)

* ksh sometimes returned wrong OPTIND values after returning from a
subshell when it executed a function within backquotes (backticks). While
the original function would behave as expected, subseqeunt calls would
result in incorrect OPTIND values, even calls made directly to the getopts
function. Now, the use of backquotes does not cause ksh to return wrong
OPTIND values on subsequent calls. (BZ#443889)

* the COMPATIBILITY file which describes differences between ksh-88 and
ksh-93 has been added to %doc. (BZ#494534)

* if the $HISTFILE did not exist and could not be created for some reason
(for example, read-only NFS home) ksh sometimes crashed with a segmentation
fault when trying to insert the last word of the previous command using the
M-_ or M-. keyboard shortcut. This is now fixed. (BZ#494363)

* the last version of ksh replaced the ast-base-locale language catalog
with a ksh-specific language catalog. However, the ksh-specific catalog
lacks translations for many of the locales shipped with ksh. Attempts to
use ksh with a non-English locale would therefore result in error messages.
Ksh now reverts to using the previous catalog, which does not produce these
errors. (BZ#493570)

* in the last version of ksh, braces for a subscripted variable with
${var[sub]} became compulsory when inside [[...]], ((...)) or as a
subscript. Because these braces were previouly optional, some shell scripts
written for earlier versions of ksh no longer worked as expected. Ksh now
recognises cases where the argument can be a pattern, and expands these
variables the same way that it expanded them when the braces were optional.
While this allows many old scripts to work in the current version of ksh,
users cannot be certain that their scripts will work as expected unless
they enclose variables in braces as defined in the ksh documentation.
(BZ#498585)

* ksh now allows command history to be saved in global history file or in
system log. (BZ#502747)

* in the last ksh version, the function nesting counter was zeroed after
forking. Therefore, typeset did not assign values in asynchronously called
functions. This is now fixed. (BZ#507562)

All users of ksh are advised to upgrade to this updated package, which
resolves these issues.


Solution

Before applying this update, make sure that all previously-released
errata relevant to your system have been applied.

This update is available via Red Hat Network. Details on how to use
the Red Hat Network to apply this update are available at
http://kbase.redhat.com/faq/docs/DOC-11259

Updated packages

RHEL Desktop Workstation (v. 5 client)

SRPMS:
ksh-20080202-14.el5.src.rpm
File outdated by:  RHBA-2011:0939
    MD5: 1bcbbf0b469752b83f333235416432bb
 
IA-32:
ksh-20080202-14.el5.i386.rpm
File outdated by:  RHBA-2011:0939
    MD5: 2e82cb0974c4181aa91068e24f3ca140
 
x86_64:
ksh-20080202-14.el5.x86_64.rpm
File outdated by:  RHBA-2011:0939
    MD5: f9cf0179758cb88405239e910a54e606
 
Red Hat Enterprise Linux (v. 5 server)

SRPMS:
ksh-20080202-14.el5.src.rpm
File outdated by:  RHBA-2011:0939
    MD5: 1bcbbf0b469752b83f333235416432bb
 
IA-32:
ksh-20080202-14.el5.i386.rpm
File outdated by:  RHBA-2011:0939
    MD5: 2e82cb0974c4181aa91068e24f3ca140
 
IA-64:
ksh-20080202-14.el5.ia64.rpm
File outdated by:  RHBA-2011:0939
    MD5: e6619c11fdafca10f25bab29a25bb647
 
PPC:
ksh-20080202-14.el5.ppc.rpm
File outdated by:  RHBA-2011:0939
    MD5: 79b36f16e1c6038e0051c1266dfa4b80
 
s390x:
ksh-20080202-14.el5.s390x.rpm
File outdated by:  RHBA-2011:0939
    MD5: 77eb1aea312c48e2bb0da9a328da9647
 
x86_64:
ksh-20080202-14.el5.x86_64.rpm
File outdated by:  RHBA-2011:0939
    MD5: f9cf0179758cb88405239e910a54e606
 
(The unlinked packages above are only available from the Red Hat Network)

Bugs fixed (see bugzilla for more information)

443889 - getopts function does not work properly when used in a function that is invoked with back quotes
465438 - builtins do not report errors on failed file operations
485030 - Umask value not restored when returning from a subshell
488798 - make ksh use 'alternatives'
488934 - ksh does not declare shell variables with hyphen
489516 - Unexpected behaviour of typeset [options] name=value
493570 - the language catalog is broken
494363 - Segfault with inacessible $HISTFILE
494534 - Please add COMPATIBILITY file to the %doc
498585 - ksh shell variable expansion in conditional expressions
507562 - ksh typeset does not assign value in an asynchronously called function


Keywords

ksh


These packages are GPG signed by Red Hat for security. Our key and details on how to verify the signature are available from:
https://www.redhat.com/security/team/key/#package

The Red Hat security contact is secalert@redhat.com. More contact details at http://www.redhat.com/security/team/contact/