diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1185,7 +1185,7 @@ mm_answer_keyallowed(int sock, Buffer *m) | |||
1185 | Key *key; | 1185 | Key *key; |
1186 | char *cuser, *chost; | 1186 | char *cuser, *chost; |
1187 | u_char *blob; | 1187 | u_char *blob; |
1188 | u_int bloblen; | 1188 | u_int bloblen, pubkey_auth_attempt; |
1189 | enum mm_keytype type = 0; | 1189 | enum mm_keytype type = 0; |
1190 | int allowed = 0; | 1190 | int allowed = 0; |
1191 | 1191 | ||
@@ -1195,6 +1195,7 @@ mm_answer_keyallowed(int sock, Buffer *m) | |||
1195 | cuser = buffer_get_string(m, NULL); | 1195 | cuser = buffer_get_string(m, NULL); |
1196 | chost = buffer_get_string(m, NULL); | 1196 | chost = buffer_get_string(m, NULL); |
1197 | blob = buffer_get_string(m, &bloblen); | 1197 | blob = buffer_get_string(m, &bloblen); |
1198 | pubkey_auth_attempt = buffer_get_int(m); | ||
1198 | 1199 | ||
1199 | key = key_from_blob(blob, bloblen); | 1200 | key = key_from_blob(blob, bloblen); |
1200 | 1201 | ||
@@ -1220,7 +1221,8 @@ mm_answer_keyallowed(int sock, Buffer *m) | |||
1220 | pubkey_auth_attempt); | 1221 | pubkey_auth_attempt); |
1221 | pubkey_auth_info(authctxt, key, NULL); | 1222 | pubkey_auth_info(authctxt, key, NULL); |
1222 | auth_method = "publickey"; | 1223 | auth_method = "publickey"; |
1223 | if (options.pubkey_authentication && allowed != 1) | 1224 | if (options.pubkey_authentication && |
1225 | (!pubkey_auth_attempt || allowed != 1)) | ||
1224 | auth_clear_options(); | 1226 | auth_clear_options(); |
1225 | break; | 1227 | break; |
1226 | case MM_HOSTKEY: | 1228 | case MM_HOSTKEY: |