Bug 2442 - comment is not set to the filename for identity files with already entered passphrase
Summary: comment is not set to the filename for identity files with already entered pa...
Status: CLOSED DUPLICATE of bug 2306
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-add (show other bugs)
Version: 6.7p1
Hardware: Other Linux
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-07 12:33 AEST by Vincent Lefevre
Modified: 2015-08-11 23:04 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 Vincent Lefevre 2015-08-07 12:33:12 AEST
With OpenSSH_6.7p1 under Debian/unstable, when I use ssh-add with multiple filenames to add several identities at once, the comment is set to the filename for the first identity, but not for the following ones. That is, for these additional identities, "ssh-add -L" and "ssh-add -l" output "rsa w/o comment" instead of the filename.

I suppose that the cause of this bug is that for these additional identities, the passphrase was already entered (I use the same one for each identity) and sshkey_parse_private_pem_fileblob() in sshkey.c sets the comment to "rsa w/o comment", which is rather uninformative. In this opposite case, add_file() in ssh-add.c sets the comment with:

        if (comment == NULL)
                comment = xstrdup(filename);
Comment 1 Vincent Lefevre 2015-08-07 13:07:10 AEST
It seems to be very similar to the description in bug 2306, and the patch would indeed fix the problem.

*** This bug has been marked as a duplicate of bug 2306 ***
Comment 2 Damien Miller 2015-08-11 23:04:09 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1