summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh-keyscan.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index ad627bb99..1849c33b4 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -43,12 +43,12 @@ int IPv4or6 = AF_UNSPEC;
43#endif 43#endif
44 44
45int ssh_port = SSH_DEFAULT_PORT; 45int ssh_port = SSH_DEFAULT_PORT;
46 46
47#define KT_RSA1 1 47#define KT_RSA1 1
48#define KT_DSA 2 48#define KT_DSA 2
49#define KT_RSA 4 49#define KT_RSA 4
50 50
51int get_keytypes = KT_RSA1; /* Get only RSA1 keys by default */ 51int get_keytypes = KT_RSA1; /* Get only RSA1 keys by default */
52 52
53#define MAXMAXFD 256 53#define MAXMAXFD 256
54 54
@@ -673,9 +673,9 @@ usage(void)
673 fprintf(stderr, " -p port Connect to the specified port.\n"); 673 fprintf(stderr, " -p port Connect to the specified port.\n");
674 fprintf(stderr, " -t keytype Specify the host key type.\n"); 674 fprintf(stderr, " -t keytype Specify the host key type.\n");
675 fprintf(stderr, " -T timeout Set connection timeout.\n"); 675 fprintf(stderr, " -T timeout Set connection timeout.\n");
676 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n"); 676 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n");
677 fprintf(stderr, " -4 Use IPv4 only.\n"); 677 fprintf(stderr, " -4 Use IPv4 only.\n");
678 fprintf(stderr, " -6 Use IPv6 only.\n"); 678 fprintf(stderr, " -6 Use IPv6 only.\n");
679 exit(1); 679 exit(1);
680} 680}
681 681
@@ -685,7 +685,7 @@ main(int argc, char **argv)
685 int debug_flag = 0, log_level = SYSLOG_LEVEL_INFO; 685 int debug_flag = 0, log_level = SYSLOG_LEVEL_INFO;
686 int opt, fopt_count = 0; 686 int opt, fopt_count = 0;
687 char *tname; 687 char *tname;
688 688
689 extern int optind; 689 extern int optind;
690 extern char *optarg; 690 extern char *optarg;
691 691
@@ -719,7 +719,7 @@ main(int argc, char **argv)
719 else 719 else
720 fatal("Too high debugging level."); 720 fatal("Too high debugging level.");
721 break; 721 break;
722 case 'f': 722 case 'f':
723 if (strcmp(optarg, "-") == 0) 723 if (strcmp(optarg, "-") == 0)
724 optarg = NULL; 724 optarg = NULL;
725 argv[fopt_count++] = optarg; 725 argv[fopt_count++] = optarg;
@@ -762,7 +762,6 @@ main(int argc, char **argv)
762 log_init("ssh-keyscan", log_level, SYSLOG_FACILITY_USER, 1); 762 log_init("ssh-keyscan", log_level, SYSLOG_FACILITY_USER, 1);
763 fatal_add_cleanup(fatal_callback, NULL); 763 fatal_add_cleanup(fatal_callback, NULL);
764 764
765
766 maxfd = fdlim_get(1); 765 maxfd = fdlim_get(1);
767 if (maxfd < 0) 766 if (maxfd < 0)
768 fatal("%s: fdlim_get: bad value", __progname); 767 fatal("%s: fdlim_get: bad value", __progname);