version 1.260, 2017/05/30 14:19:15 |
version 1.261, 2017/05/30 14:23:52 |
|
|
int *batch_flag; /* flag in option struct that disables method */ |
int *batch_flag; /* flag in option struct that disables method */ |
}; |
}; |
|
|
int input_userauth_service_accept(int, u_int32_t, void *); |
int input_userauth_service_accept(int, u_int32_t, struct ssh *); |
int input_userauth_ext_info(int, u_int32_t, void *); |
int input_userauth_ext_info(int, u_int32_t, struct ssh *); |
int input_userauth_success(int, u_int32_t, void *); |
int input_userauth_success(int, u_int32_t, struct ssh *); |
int input_userauth_success_unexpected(int, u_int32_t, void *); |
int input_userauth_success_unexpected(int, u_int32_t, struct ssh *); |
int input_userauth_failure(int, u_int32_t, void *); |
int input_userauth_failure(int, u_int32_t, struct ssh *); |
int input_userauth_banner(int, u_int32_t, void *); |
int input_userauth_banner(int, u_int32_t, struct ssh *); |
int input_userauth_error(int, u_int32_t, void *); |
int input_userauth_error(int, u_int32_t, struct ssh *); |
int input_userauth_info_req(int, u_int32_t, void *); |
int input_userauth_info_req(int, u_int32_t, struct ssh *); |
int input_userauth_pk_ok(int, u_int32_t, void *); |
int input_userauth_pk_ok(int, u_int32_t, struct ssh *); |
int input_userauth_passwd_changereq(int, u_int32_t, void *); |
int input_userauth_passwd_changereq(int, u_int32_t, struct ssh *); |
|
|
int userauth_none(Authctxt *); |
int userauth_none(Authctxt *); |
int userauth_pubkey(Authctxt *); |
int userauth_pubkey(Authctxt *); |
|
|
|
|
#ifdef GSSAPI |
#ifdef GSSAPI |
int userauth_gssapi(Authctxt *authctxt); |
int userauth_gssapi(Authctxt *authctxt); |
int input_gssapi_response(int type, u_int32_t, void *); |
int input_gssapi_response(int type, u_int32_t, struct ssh *); |
int input_gssapi_token(int type, u_int32_t, void *); |
int input_gssapi_token(int type, u_int32_t, struct ssh *); |
int input_gssapi_hash(int type, u_int32_t, void *); |
int input_gssapi_hash(int type, u_int32_t, struct ssh *); |
int input_gssapi_error(int, u_int32_t, void *); |
int input_gssapi_error(int, u_int32_t, struct ssh *); |
int input_gssapi_errtok(int, u_int32_t, void *); |
int input_gssapi_errtok(int, u_int32_t, struct ssh *); |
#endif |
#endif |
|
|
void userauth(Authctxt *, char *); |
void userauth(Authctxt *, char *); |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_service_accept(int type, u_int32_t seqnr, void *ctxt) |
input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
int r; |
int r; |
|
|
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_ext_info(int type, u_int32_t seqnr, void *ctxt) |
input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh) |
{ |
{ |
return kex_input_ext_info(type, seqnr, ctxt); |
return kex_input_ext_info(type, seqnr, ssh); |
} |
} |
|
|
void |
void |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_error(int type, u_int32_t seq, void *ctxt) |
input_userauth_error(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
fatal("input_userauth_error: bad message during authentication: " |
fatal("input_userauth_error: bad message during authentication: " |
"type %d", type); |
"type %d", type); |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_banner(int type, u_int32_t seq, void *ctxt) |
input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
char *msg, *lang; |
char *msg, *lang; |
u_int len; |
u_int len; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_success(int type, u_int32_t seq, void *ctxt) |
input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
|
|
if (authctxt == NULL) |
if (authctxt == NULL) |
|
|
} |
} |
|
|
int |
int |
input_userauth_success_unexpected(int type, u_int32_t seq, void *ctxt) |
input_userauth_success_unexpected(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
|
|
if (authctxt == NULL) |
if (authctxt == NULL) |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_failure(int type, u_int32_t seq, void *ctxt) |
input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
char *authlist = NULL; |
char *authlist = NULL; |
int partial; |
int partial; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) |
input_userauth_pk_ok(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
struct sshkey *key = NULL; |
struct sshkey *key = NULL; |
Identity *id = NULL; |
Identity *id = NULL; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_gssapi_response(int type, u_int32_t plen, void *ctxt) |
input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
Gssctxt *gssctxt; |
Gssctxt *gssctxt; |
int oidlen; |
int oidlen; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_gssapi_token(int type, u_int32_t plen, void *ctxt) |
input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
gss_buffer_desc recv_tok; |
gss_buffer_desc recv_tok; |
OM_uint32 status; |
OM_uint32 status; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) |
input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
Gssctxt *gssctxt; |
Gssctxt *gssctxt; |
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER; |
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER; |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_gssapi_error(int type, u_int32_t plen, void *ctxt) |
input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) |
{ |
{ |
char *msg; |
char *msg; |
char *lang; |
char *lang; |
|
|
*/ |
*/ |
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt) |
input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
char *info, *lang, *password = NULL, *retype = NULL; |
char *info, *lang, *password = NULL, *retype = NULL; |
char prompt[150]; |
char prompt[150]; |
|
|
* parse INFO_REQUEST, prompt user and send INFO_RESPONSE |
* parse INFO_REQUEST, prompt user and send INFO_RESPONSE |
*/ |
*/ |
int |
int |
input_userauth_info_req(int type, u_int32_t seq, void *ctxt) |
input_userauth_info_req(int type, u_int32_t seq, struct ssh *ssh) |
{ |
{ |
struct ssh *ssh = ctxt; |
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
char *name, *inst, *lang, *prompt, *response; |
char *name, *inst, *lang, *prompt, *response; |
u_int num_prompts, i; |
u_int num_prompts, i; |