diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-09-04 04:44:08 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-09-04 16:57:01 +1000 |
commit | f54d8ac2474b6fc3afa081cf759b48a6c89d3319 (patch) | |
tree | f6ba5ffc25f382551a8b472beb5537c93cb2e7c3 | |
parent | ac3451dd65f27ecf85dc045c46d49e2bbcb8dddd (diff) |
upstream commit
don't record hostbased authentication hostkeys as user
keys in test for multiple authentication with the same key
Upstream-ID: 26b368fa2cff481f47f37e01b8da1ae5b57b1adc
-rw-r--r-- | monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.152 2015/09/02 07:51:12 jsg Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.153 2015/09/04 04:44:08 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> | 4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> |
@@ -1444,7 +1444,7 @@ mm_answer_keyverify(int sock, Buffer *m) | |||
1444 | __func__, key, (verified == 1) ? "verified" : "unverified"); | 1444 | __func__, key, (verified == 1) ? "verified" : "unverified"); |
1445 | 1445 | ||
1446 | /* If auth was successful then record key to ensure it isn't reused */ | 1446 | /* If auth was successful then record key to ensure it isn't reused */ |
1447 | if (verified == 1) | 1447 | if (verified == 1 && key_blobtype == MM_USERKEY) |
1448 | auth2_record_userkey(authctxt, key); | 1448 | auth2_record_userkey(authctxt, key); |
1449 | else | 1449 | else |
1450 | key_free(key); | 1450 | key_free(key); |