Bugzilla – Attachment 3229 Details for
Bug 2903
ssh-keyscan returns '0' when no keys are found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
exit with status 1 if no keys found
bz2903.diff (text/plain), 753 bytes, created by
Damien Miller
on 2019-01-23 20:32:08 AEDT
(
hide
)
Description:
exit with status 1 if no keys found
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2019-01-23 20:32:08 AEDT
Size:
753 bytes
patch
obsolete
>diff --git a/ssh-keyscan.c b/ssh-keyscan.c >index 1e76f3f..d545911 100644 >--- a/ssh-keyscan.c >+++ b/ssh-keyscan.c >@@ -64,6 +64,8 @@ int hash_hosts = 0; /* Hash hostname on output */ > > int print_sshfp = 0; /* Print SSHFP records instead of known_hosts */ > >+int found_one = 0; /* Successfully found a key */ >+ > #define MAXMAXFD 256 > > /* The number of seconds after which to give up on a TCP connection */ >@@ -269,6 +271,8 @@ keyprint_one(const char *host, struct sshkey *key) > char *hostport; > const char *known_host, *hashed; > >+ found_one = 1; >+ > if (print_sshfp) { > export_dns_rr(host, key, stdout, 0); > return; >@@ -782,5 +786,5 @@ main(int argc, char **argv) > while (ncon > 0) > conloop(); > >- return (0); >+ return found_one ? 0 : 1; > }
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 2903
: 3229