Bugzilla – Attachment 2847 Details for
Bug 2591
ssh-keygen -R is case-sensitive, but should not be
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
lowercase filenames as they are added
bz2591.diff (text/plain), 875 bytes, created by
Damien Miller
on 2016-07-08 13:31:58 AEST
(
hide
)
Description:
lowercase filenames as they are added
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2016-07-08 13:31:58 AEST
Size:
875 bytes
patch
obsolete
>diff --git a/hostfile.c b/hostfile.c >index 1f225ca..2587522 100644 >--- a/hostfile.c >+++ b/hostfile.c >@@ -417,19 +417,24 @@ write_host_entry(FILE *f, const char *host, const char *ip, > const struct sshkey *key, int store_hash) > { > int r, success = 0; >- char *hashed_host = NULL; >+ char *hashed_host = NULL, *lhost; >+ >+ lhost = xstrdup(host); >+ lowercase(lhost); > > if (store_hash) { >- if ((hashed_host = host_hash(host, NULL, 0)) == NULL) { >+ if ((hashed_host = host_hash(lhost, NULL, 0)) == NULL) { > error("%s: host_hash failed", __func__); >+ free(lhost); > return 0; > } > fprintf(f, "%s ", hashed_host); > } else if (ip != NULL) >- fprintf(f, "%s,%s ", host, ip); >- else >- fprintf(f, "%s ", host); >- >+ fprintf(f, "%s,%s ", lhost, ip); >+ else { >+ fprintf(f, "%s ", lhost); >+ } >+ free(lhost); > if ((r = sshkey_write(key, f)) == 0) > success = 1; > else
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 2591
:
2841
|
2847
|
2959