diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -714,7 +714,7 @@ main(int ac, char **av) | |||
714 | /* Do not allocate a tty if stdin is not a tty. */ | 714 | /* Do not allocate a tty if stdin is not a tty. */ |
715 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && | 715 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && |
716 | options.request_tty != REQUEST_TTY_FORCE) { | 716 | options.request_tty != REQUEST_TTY_FORCE) { |
717 | if (tty_flag) | 717 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
718 | logit("Pseudo-terminal will not be allocated because " | 718 | logit("Pseudo-terminal will not be allocated because " |
719 | "stdin is not a terminal."); | 719 | "stdin is not a terminal."); |
720 | tty_flag = 0; | 720 | tty_flag = 0; |
@@ -1495,7 +1495,7 @@ ssh_session2(void) | |||
1495 | static void | 1495 | static void |
1496 | load_public_identity_files(void) | 1496 | load_public_identity_files(void) |
1497 | { | 1497 | { |
1498 | char *filename, *cp, thishost[NI_MAXHOST]; | 1498 | char *filename, *cp, thishost[NI_MAXHOST], *fp; |
1499 | char *pwdir = NULL, *pwname = NULL; | 1499 | char *pwdir = NULL, *pwname = NULL; |
1500 | int i = 0; | 1500 | int i = 0; |
1501 | Key *public; | 1501 | Key *public; |
@@ -1552,6 +1552,22 @@ load_public_identity_files(void) | |||
1552 | public = key_load_public(filename, NULL); | 1552 | public = key_load_public(filename, NULL); |
1553 | debug("identity file %s type %d", filename, | 1553 | debug("identity file %s type %d", filename, |
1554 | public ? public->type : -1); | 1554 | public ? public->type : -1); |
1555 | if (public && blacklisted_key(public, &fp) == 1) { | ||
1556 | if (options.use_blacklisted_keys) | ||
1557 | logit("Public key %s blacklisted (see " | ||
1558 | "ssh-vulnkey(1)); continuing anyway", fp); | ||
1559 | else | ||
1560 | logit("Public key %s blacklisted (see " | ||
1561 | "ssh-vulnkey(1)); refusing to send it", | ||
1562 | fp); | ||
1563 | xfree(fp); | ||
1564 | if (!options.use_blacklisted_keys) { | ||
1565 | key_free(public); | ||
1566 | xfree(filename); | ||
1567 | filename = NULL; | ||
1568 | public = NULL; | ||
1569 | } | ||
1570 | } | ||
1555 | xfree(options.identity_files[i]); | 1571 | xfree(options.identity_files[i]); |
1556 | identity_files[n_ids] = filename; | 1572 | identity_files[n_ids] = filename; |
1557 | identity_keys[n_ids] = public; | 1573 | identity_keys[n_ids] = public; |