Bug 485725 - /etc/profile.d/keychain.sh assumes parsing shell groks zshisms
/etc/profile.d/keychain.sh assumes parsing shell groks zshisms
Status: CLOSED DUPLICATE of bug 314431
Product: Fedora
Classification: Fedora
Component: keychain (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Alexander Dalloz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-16 10:54 EST by Jan Schaumann
Modified: 2009-02-16 18:29 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-16 18:29:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Schaumann 2009-02-16 10:54:27 EST
Description of problem:

If your login shell is /bin/ksh, you may get an error upon login when /etc/profile sources all .sh files under /etc/profile.d/.  In particular:


/etc/profile[49]: .: syntax error at line 19: `=' unexpected

This can be traced back to /etc/profile.d/keychain.sh, where the following code is executed:

    if [ -n "$ZSH_VERSION" ] ; then
        keychain ${=KCHOPTS} ${=SSHKEYS} ${=GPGKEYS}
    else
        keychain $KCHOPTS $SSHKEYS $GPGKEYS
    fi


${=KCHOPTS} etc. is not valid bourne shell or ksh syntax.  This script assumes that the code block following the conditional is not only not executed, but not even parsed.  It appears that ksh tries to parse the code block even though it won't execute it, and thus complains.






Version-Release number of selected component (if applicable):

$ rpm -q keychain
keychain-2.6.8-2.fc7
$ cat /etc/redhat-release
Fedora release 8 (Werewolf)




How reproducible:

Always.



Steps to Reproduce:
1.ksh
2. . /etc/profile.d/keychain.sh
  
Actual results:
-ksh: .: syntax error: `=' unexpected



Expected results:


Additional info:
Comment 1 Ville Skyttä 2009-02-16 18:29:29 EST

*** This bug has been marked as a duplicate of bug 314431 ***

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