Bug 439 - key_try_load_public() always sets pathname as the keyfile's comment
Summary: key_try_load_public() always sets pathname as the keyfile's comment
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: -current
Hardware: All All
: P2 trivial
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
: 566 (view as bug list)
Depends on:
Blocks: V_5_9
  Show dependency treegraph
 
Reported: 2002-11-20 00:35 AEDT by Thomas Binder
Modified: 2011-09-06 15:33 AEST (History)
1 user (show)

See Also:


Attachments
Proposed patch (391 bytes, patch)
2002-11-20 00:37 AEDT, Thomas Binder
no flags Details | Diff
New patch, now strips newline (415 bytes, patch)
2003-05-15 00:02 AEST, Thomas Binder
no flags Details | Diff
/home/djm/ssh-authfile-preserve-comments.diff (615 bytes, patch)
2010-11-24 11:34 AEDT, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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