Bug 439

Summary: key_try_load_public() always sets pathname as the keyfile's comment
Product: Portable OpenSSH Reporter: Thomas Binder <binder>
Component: MiscellaneousAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: trivial CC: djm
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1845    
Attachments:
Description Flags
Proposed patch
none
New patch, now strips newline
none
/home/djm/ssh-authfile-preserve-comments.diff none

Description Thomas Binder 2002-11-20 00:35:24 AEDT
The function key_try_load_public() in authfile.c always uses the key's pathname
as the comment, ignoring any comment actually given in the public key file.
Comment 1 Thomas Binder 2002-11-20 00:37:30 AEDT
Created attachment 178 [details]
Proposed patch

This patch returns the keyfile's comment if there is one, the keyfile's path
otherwise.
Comment 2 Damien Miller 2003-05-14 22:35:28 AEST
This won't work through protocol 2 agent connections IIRC
Comment 3 Damien Miller 2003-05-14 22:50:28 AEST
*** Bug 566 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Binder 2003-05-15 00:00:40 AEST
> *** Bug 566 has been marked as a duplicate of this bug. ***

This is so embarrassing - I didn't remember I had already filed
this patch. Sorry for that.

Anyway, the patch here is not working correctly, as it doesn't
strip the newline at the end of the comment, so I'll attach the
new one.

> This won't work through protocol 2 agent connections IIRC

Mhmm, could you go a bit more into detail? Why should

/home/foo/.ssh/id_rsa.pub

work when placed in *commentp, but not

someone@example.com
Comment 5 Thomas Binder 2003-05-15 00:02:07 AEST
Created attachment 296 [details]
New patch, now strips newline
Comment 6 Damien Miller 2010-11-24 11:34:54 AEDT
Created attachment 1964 [details]
/home/djm/ssh-authfile-preserve-comments.diff

Revised diff
Comment 7 Damien Miller 2011-05-23 17:25:22 AEST
this will be in openssh-5.9
Comment 8 Damien Miller 2011-09-06 15:33:13 AEST
close resolved bugs now that openssh-5.9 has been released