Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When set -u is used, ksh should treat unset parameters as an error when substituting. This does not work for unset positional parameters like $1. It does work, however, for usual variables (see the attached reproducer).
Version-Release number of selected component (if applicable):
20120801-22.el7_1.1
How reproducible:
always
Steps to Reproduce:
1. run the attached reproducer
Actual results:
No error printed for $1.
Expected results:
An error printed for $1
Additional info:
N/A
This is intentional change made by upstream.
09-05-12 To conform with POSIX, the -u option only checks for unset variables
and subscript elements rather than checking for all parameters.
Michal,
Had the customer ask the following:
"Your update is clear that upstream made this as a deliberate change to conform with POSIX.
Is the upstream position that this is not a bug/ regression and will not be fixed and that the previous behaviour will not be made available through an option/ environment variable?
Tim
"
I re-opened this so that you'll get the notification. I would like to have an answer to this as I think it's a really well thought out question.
Cheers,
Karl
Michal,
Also:
"Hi Karl,
A point of interest:
Checking with our Solaris team they have a case open with Oracle for the same issue.
Oracle responded to our Solaris team today that they (Oracle Solaris engineering) have been working on a change which has been integrated into the upstream.
Tim"
Karl
When the change in varsub() in macro.c mentioned in the following post is made, we get in the newly added part of the code, when $1 is being expanded:
http://lists.research.att.com/pipermail/ast-developers/2015q2/004038.html
Then strchr() seems to return a pointer to the terminator and errormsg() is not called.
Comment 19Siteshwar Vashisht
2017-01-30 13:20:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:1936