version 1.167, 2023/08/28 09:48:11 |
version 1.168, 2023/12/18 14:45:49 |
|
|
#include "monitor_wrap.h" |
#include "monitor_wrap.h" |
#include "ssherr.h" |
#include "ssherr.h" |
#include "digest.h" |
#include "digest.h" |
|
#include "kex.h" |
|
|
/* import */ |
/* import */ |
extern ServerOptions options; |
extern ServerOptions options; |
|
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
|
|
ssh_dispatch_init(ssh, &dispatch_protocol_error); |
ssh_dispatch_init(ssh, &dispatch_protocol_error); |
|
if (ssh->kex->ext_info_c) |
|
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_input_ext_info); |
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request); |
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request); |
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success); |
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success); |
ssh->authctxt = NULL; |
ssh->authctxt = NULL; |
|
|
debug("bad service request %s", service); |
debug("bad service request %s", service); |
ssh_packet_disconnect(ssh, "bad service request %s", service); |
ssh_packet_disconnect(ssh, "bad service request %s", service); |
} |
} |
|
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &dispatch_protocol_error); |
r = 0; |
r = 0; |
out: |
out: |
free(service); |
free(service); |
|
|
if (use_privsep) |
if (use_privsep) |
mm_inform_authserv(service, style); |
mm_inform_authserv(service, style); |
userauth_banner(ssh); |
userauth_banner(ssh); |
|
if ((r = kex_server_update_ext_info(ssh)) != 0) |
|
fatal_fr(r, "kex_server_update_ext_info failed"); |
if (auth2_setup_methods_lists(authctxt) != 0) |
if (auth2_setup_methods_lists(authctxt) != 0) |
ssh_packet_disconnect(ssh, |
ssh_packet_disconnect(ssh, |
"no authentication methods enabled"); |
"no authentication methods enabled"); |