diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -642,7 +642,7 @@ main(int ac, char **av) | |||
642 | tty_flag = 0; | 642 | tty_flag = 0; |
643 | /* Do not allocate a tty if stdin is not a tty. */ | 643 | /* Do not allocate a tty if stdin is not a tty. */ |
644 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 644 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
645 | if (tty_flag) | 645 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
646 | logit("Pseudo-terminal will not be allocated because " | 646 | logit("Pseudo-terminal will not be allocated because " |
647 | "stdin is not a terminal."); | 647 | "stdin is not a terminal."); |
648 | tty_flag = 0; | 648 | tty_flag = 0; |
@@ -1422,7 +1422,7 @@ ssh_session2(void) | |||
1422 | static void | 1422 | static void |
1423 | load_public_identity_files(void) | 1423 | load_public_identity_files(void) |
1424 | { | 1424 | { |
1425 | char *filename, *cp, thishost[NI_MAXHOST]; | 1425 | char *filename, *cp, thishost[NI_MAXHOST], *fp; |
1426 | char *pwdir = NULL, *pwname = NULL; | 1426 | char *pwdir = NULL, *pwname = NULL; |
1427 | int i = 0; | 1427 | int i = 0; |
1428 | Key *public; | 1428 | Key *public; |
@@ -1479,6 +1479,22 @@ load_public_identity_files(void) | |||
1479 | public = key_load_public(filename, NULL); | 1479 | public = key_load_public(filename, NULL); |
1480 | debug("identity file %s type %d", filename, | 1480 | debug("identity file %s type %d", filename, |
1481 | public ? public->type : -1); | 1481 | public ? public->type : -1); |
1482 | if (public && blacklisted_key(public, &fp) == 1) { | ||
1483 | if (options.use_blacklisted_keys) | ||
1484 | logit("Public key %s blacklisted (see " | ||
1485 | "ssh-vulnkey(1)); continuing anyway", fp); | ||
1486 | else | ||
1487 | logit("Public key %s blacklisted (see " | ||
1488 | "ssh-vulnkey(1)); refusing to send it", | ||
1489 | fp); | ||
1490 | xfree(fp); | ||
1491 | if (!options.use_blacklisted_keys) { | ||
1492 | key_free(public); | ||
1493 | xfree(filename); | ||
1494 | filename = NULL; | ||
1495 | public = NULL; | ||
1496 | } | ||
1497 | } | ||
1482 | xfree(options.identity_files[i]); | 1498 | xfree(options.identity_files[i]); |
1483 | identity_files[n_ids] = filename; | 1499 | identity_files[n_ids] = filename; |
1484 | identity_keys[n_ids] = public; | 1500 | identity_keys[n_ids] = public; |