Bug 199 - ssh-agent -k doesn't check $SHELL environment variable
Summary: ssh-agent -k doesn't check $SHELL environment variable
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-agent (show other bugs)
Version: -current
Hardware: All All
: P3 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-02 13:27 AEST by Damian Menscher
Modified: 2004-04-14 12:24 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damian Menscher 2002-04-02 13:27:31 AEST
Line 882 of ssh-agent.c reads:
if (ac == 0 && !c_flag && !k_flag && !s_flag && !d_flag) {
   stuff to set c_flag=1 iff $SHELL=*csh
}

This means that someone running ssh-agent -k will have k_flag set and therefore 
won't get the auto-shell determination, therefore leaving them with bash-style 
commands.

I'm guessing the debug flag shouldn't be here either, so the correct line would 
read:
if (ac == 0 && !c_flag && !s_flag) {

This was originally found to be broken on IRIX 6.5.15m, but looking at the 
source made it obvious it was cross-platform.
Comment 1 Markus Friedl 2002-04-02 21:51:59 AEST
thanks, patch applied
Comment 2 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED