Bugzilla – Attachment 2959 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]
A couple more cases
bz2591.diff (text/plain), 2.19 KB, created by
Damien Miller
on 2017-03-10 14:49:16 AEDT
(
hide
)
Description:
A couple more cases
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-03-10 14:49:16 AEDT
Size:
2.19 KB
patch
obsolete
>Index: hostfile.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/hostfile.c,v >retrieving revision 1.67 >diff -u -p -r1.67 hostfile.c >--- hostfile.c 17 Sep 2016 18:00:27 -0000 1.67 >+++ hostfile.c 10 Mar 2017 03:47:38 -0000 >@@ -416,19 +416,24 @@ write_host_entry(FILE *f, const char *ho > 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 >Index: ssh-keygen.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh-keygen.c,v >retrieving revision 1.298 >diff -u -p -r1.298 ssh-keygen.c >--- ssh-keygen.c 6 Mar 2017 02:03:20 -0000 1.298 >+++ ssh-keygen.c 10 Mar 2017 03:47:40 -0000 >@@ -1092,6 +1092,7 @@ known_hosts_hash(struct hostkey_foreach_ > */ > ohosts = hosts = xstrdup(l->hosts); > while ((cp = strsep(&hosts, ",")) != NULL && *cp != '\0') { >+ lowercase(cp); > if ((hashed = host_hash(cp, NULL, 0)) == NULL) > fatal("hash_host failed"); > fprintf(ctx->out, "%s %s\n", hashed, l->rawkey); >Index: ssh-keyscan.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh-keyscan.c,v >retrieving revision 1.108 >diff -u -p -r1.108 ssh-keyscan.c >--- ssh-keyscan.c 10 Mar 2017 03:18:24 -0000 1.108 >+++ ssh-keyscan.c 10 Mar 2017 03:47:40 -0000 >@@ -307,6 +307,7 @@ keyprint_one(const char *host, struct ss > const char *known_host, *hashed; > > hostport = put_host_port(host, ssh_port); >+ lowercase(hostport); > if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL) > fatal("host_hash failed"); > known_host = hash_hosts ? hashed : hostport;
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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2591
:
2841
|
2847
| 2959