Bug 158

Summary: ssh-add trips up due to missing key types
Product: Portable OpenSSH Reporter: William Knox <wknox>
Component: ssh-addAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: cagri
Priority: P4    
Version: -current   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch to fix described problem
none
Updated patch to only disregard errors finding default keys
none
this patch just affects the 'default keys'
none
Previous patch is missing a semicolon none

Description William Knox 2002-03-12 06:42:17 AEDT
ssh-add will now return a non-zero status when adding keys, due solely to the
fact that one or more key types was never created. I propose that if a key file
just doesn't exist, that is an intentional act that should not result in a
non-zero exit (this is of any concern to me because I have scripts for our users
that depend on a zero exit of ssh-add when they run it in order to continue, and
I can't tell what other people may have done which will break, and I just think
backwards compatibilty is a good thing when it is easy). I have a patch which I
will attach.
Comment 1 William Knox 2002-03-12 06:43:16 AEDT
Created attachment 38 [details]
Patch to fix described problem
Comment 2 William Knox 2002-03-12 08:52:15 AEDT
OK, the patch I had didn't take into account the fact that if you specify a file
on the command line, you would get no warning that the file didn't exist. Not a
good idea. So, here is an updated patch that makes sure to only disregard
default files, not ones you specify.
Comment 3 William Knox 2002-03-12 08:53:16 AEDT
Created attachment 39 [details]
Updated patch to only disregard errors finding default keys
Comment 4 William Knox 2002-03-15 02:06:23 AEDT
*** Bug 166 has been marked as a duplicate of this bug. ***
Comment 5 Markus Friedl 2002-03-17 04:45:36 AEDT
Created attachment 45 [details]
this patch just affects the 'default keys'
Comment 6 William Knox 2002-03-20 03:11:41 AEDT
Created attachment 49 [details]
Previous patch is missing a semicolon
Comment 7 William Knox 2002-03-20 03:19:58 AEDT
This patch works fine for me, and catches the additional error condition of not
finding any default keys (looks like I got stuck enhancing my first pass at a
patch instead of approaching it again). I'm using this one now. Thanks, Markus.
Comment 8 Markus Friedl 2002-03-21 21:32:40 AEDT
applied patch.
Comment 9 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED