Bug 436901
Summary: | It should not be allowed if environment variable begins with a digit | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Cai Xianchao <caixianchao> | ||||||||
Component: | tcsh617 | Assignee: | Vojtech Vitek <vvitek> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 5.1 | CC: | bnater, hripps, msvoboda, ovasik | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | i386 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: |
Previously, the tcsh shell allowed to name variables in incorrect formats, such as by beginning a variable name with a digit. This issue has been fixed: variable names are now verified according to Unix variable-naming conventions.
|
Story Points: | --- | ||||||||
Clone Of: | |||||||||||
: | 672592 (view as bug list) | Environment: | |||||||||
Last Closed: | 2011-07-21 08:49:21 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 672592 | ||||||||||
Attachments: |
|
Description
Cai Xianchao
2008-03-11 01:36:53 UTC
Created attachment 297554 [details]
This is a patch fixing the bug.
True, both bash and ksh don't allow you to set variable starting with number. $ export 1t=a bash/ksh: export: `1t=a': not a valid identifier Have you tried to send this patch to upstream? (The issue is still valid in tcsh 6.17.00.) This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release. Created attachment 473516 [details]
Patch for environment variable names
I have improved your patch a little, according to UNIX variables name conventions: "All variables must begin with a letter (or an underscore), followed by zero or more alpha-numeric chars or underscores."
I will fix few more bugs in naming convention (foreach, do-while and other builtins) as well. Then I will propose it to upstream as one patch.
Created attachment 473854 [details] Patch to fix variable name conventions (set, setenv, foreach) Proposed to upstream: http://bugs.gw.com/view.php?id=113 The patch has been accepted by upstream (6.17.03b). Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, the tcsh shell allowed to name variables in incorrect formats, such as by beginning a variable name with a digit. This issue has been fixed: variable names are now verified according to Unix variable-naming conventions. 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-2011-1072.html 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-2011-1072.html |