Bug 485725 - /etc/profile.d/keychain.sh assumes parsing shell groks zshisms
Summary: /etc/profile.d/keychain.sh assumes parsing shell groks zshisms
Status: CLOSED DUPLICATE of bug 314431
Alias: None
Product: Fedora
Classification: Fedora
Component: keychain
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Alexander Dalloz
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-02-16 15:54 UTC by Jan Schaumann
Modified: 2009-02-16 23:29 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2009-02-16 23:29:29 UTC

Attachments (Terms of Use)

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}
        keychain $KCHOPTS $SSHKEYS $GPGKEYS

${=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
$ cat /etc/redhat-release
Fedora release 8 (Werewolf)

How reproducible:


Steps to Reproduce:
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 ***

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