diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -678,7 +678,7 @@ main(int ac, char **av) | |||
678 | /* Do not allocate a tty if stdin is not a tty. */ | 678 | /* Do not allocate a tty if stdin is not a tty. */ |
679 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && | 679 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && |
680 | options.request_tty != REQUEST_TTY_FORCE) { | 680 | options.request_tty != REQUEST_TTY_FORCE) { |
681 | if (tty_flag) | 681 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
682 | logit("Pseudo-terminal will not be allocated because " | 682 | logit("Pseudo-terminal will not be allocated because " |
683 | "stdin is not a terminal."); | 683 | "stdin is not a terminal."); |
684 | tty_flag = 0; | 684 | tty_flag = 0; |
@@ -1476,7 +1476,7 @@ ssh_session2(void) | |||
1476 | static void | 1476 | static void |
1477 | load_public_identity_files(void) | 1477 | load_public_identity_files(void) |
1478 | { | 1478 | { |
1479 | char *filename, *cp, thishost[NI_MAXHOST]; | 1479 | char *filename, *cp, thishost[NI_MAXHOST], *fp; |
1480 | char *pwdir = NULL, *pwname = NULL; | 1480 | char *pwdir = NULL, *pwname = NULL; |
1481 | int i = 0; | 1481 | int i = 0; |
1482 | Key *public; | 1482 | Key *public; |
@@ -1533,6 +1533,22 @@ load_public_identity_files(void) | |||
1533 | public = key_load_public(filename, NULL); | 1533 | public = key_load_public(filename, NULL); |
1534 | debug("identity file %s type %d", filename, | 1534 | debug("identity file %s type %d", filename, |
1535 | public ? public->type : -1); | 1535 | public ? public->type : -1); |
1536 | if (public && blacklisted_key(public, &fp) == 1) { | ||
1537 | if (options.use_blacklisted_keys) | ||
1538 | logit("Public key %s blacklisted (see " | ||
1539 | "ssh-vulnkey(1)); continuing anyway", fp); | ||
1540 | else | ||
1541 | logit("Public key %s blacklisted (see " | ||
1542 | "ssh-vulnkey(1)); refusing to send it", | ||
1543 | fp); | ||
1544 | xfree(fp); | ||
1545 | if (!options.use_blacklisted_keys) { | ||
1546 | key_free(public); | ||
1547 | xfree(filename); | ||
1548 | filename = NULL; | ||
1549 | public = NULL; | ||
1550 | } | ||
1551 | } | ||
1536 | xfree(options.identity_files[i]); | 1552 | xfree(options.identity_files[i]); |
1537 | identity_files[n_ids] = filename; | 1553 | identity_files[n_ids] = filename; |
1538 | identity_keys[n_ids] = public; | 1554 | identity_keys[n_ids] = public; |