diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -740,7 +740,7 @@ main(int ac, char **av) | |||
740 | /* Do not allocate a tty if stdin is not a tty. */ | 740 | /* Do not allocate a tty if stdin is not a tty. */ |
741 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && | 741 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && |
742 | options.request_tty != REQUEST_TTY_FORCE) { | 742 | options.request_tty != REQUEST_TTY_FORCE) { |
743 | if (tty_flag) | 743 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
744 | logit("Pseudo-terminal will not be allocated because " | 744 | logit("Pseudo-terminal will not be allocated because " |
745 | "stdin is not a terminal."); | 745 | "stdin is not a terminal."); |
746 | tty_flag = 0; | 746 | tty_flag = 0; |
@@ -1525,7 +1525,7 @@ ssh_session2(void) | |||
1525 | static void | 1525 | static void |
1526 | load_public_identity_files(void) | 1526 | load_public_identity_files(void) |
1527 | { | 1527 | { |
1528 | char *filename, *cp, thishost[NI_MAXHOST]; | 1528 | char *filename, *cp, thishost[NI_MAXHOST], *fp; |
1529 | char *pwdir = NULL, *pwname = NULL; | 1529 | char *pwdir = NULL, *pwname = NULL; |
1530 | int i = 0; | 1530 | int i = 0; |
1531 | Key *public; | 1531 | Key *public; |
@@ -1583,6 +1583,22 @@ load_public_identity_files(void) | |||
1583 | public = key_load_public(filename, NULL); | 1583 | public = key_load_public(filename, NULL); |
1584 | debug("identity file %s type %d", filename, | 1584 | debug("identity file %s type %d", filename, |
1585 | public ? public->type : -1); | 1585 | public ? public->type : -1); |
1586 | if (public && blacklisted_key(public, &fp) == 1) { | ||
1587 | if (options.use_blacklisted_keys) | ||
1588 | logit("Public key %s blacklisted (see " | ||
1589 | "ssh-vulnkey(1)); continuing anyway", fp); | ||
1590 | else | ||
1591 | logit("Public key %s blacklisted (see " | ||
1592 | "ssh-vulnkey(1)); refusing to send it", | ||
1593 | fp); | ||
1594 | free(fp); | ||
1595 | if (!options.use_blacklisted_keys) { | ||
1596 | key_free(public); | ||
1597 | free(filename); | ||
1598 | filename = NULL; | ||
1599 | public = NULL; | ||
1600 | } | ||
1601 | } | ||
1586 | free(options.identity_files[i]); | 1602 | free(options.identity_files[i]); |
1587 | identity_files[n_ids] = filename; | 1603 | identity_files[n_ids] = filename; |
1588 | identity_keys[n_ids] = public; | 1604 | identity_keys[n_ids] = public; |