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   
(Show other bugs)
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Alexander Dalloz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
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)

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: ---


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}
    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 ***


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