Bug 485725

Summary: /etc/profile.d/keychain.sh assumes parsing shell groks zshisms
Product: [Fedora] Fedora Reporter: Jan Schaumann <jschauma>
Component: keychainAssignee: Alexander Dalloz <alex>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: alex
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-16 23:29:29 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:

Description Jan Schaumann 2009-02-16 15:54:27 UTC
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 23:29:29 UTC

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