Bugzilla – Attachment 2426 Details for
Bug 2229
ssh adds and offers private key twice in certain constellations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
avoid adding identity files twice
undup-identity.diff (text/plain), 979 bytes, created by
Damien Miller
on 2014-04-17 09:32:52 AEST
(
hide
)
Description:
avoid adding identity files twice
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2014-04-17 09:32:52 AEST
Size:
979 bytes
patch
obsolete
>Index: readconf.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/readconf.c,v >retrieving revision 1.218 >diff -u -p -r1.218 readconf.c >--- readconf.c 23 Feb 2014 20:11:36 -0000 1.218 >+++ readconf.c 16 Apr 2014 23:24:22 -0000 >@@ -336,6 +336,7 @@ add_identity_file(Options *options, cons > int userprovided) > { > char *path; >+ int i; > > if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES) > fatal("Too many identity files specified (max %d)", >@@ -345,6 +346,13 @@ add_identity_file(Options *options, cons > path = xstrdup(filename); > else > (void)xasprintf(&path, "%.100s%.100s", dir, filename); >+ >+ /* Avoid registering duplicates */ >+ for (i = 0; i < options->num_identity_files; i++) { >+ if (options->identity_file_userprovided[i] == userprovided && >+ strcmp(options->identity_files[i], path) == 0) >+ return; >+ } > > options->identity_file_userprovided[options->num_identity_files] = > userprovided;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2229
: 2426