version 1.21, 2014/02/26 20:28:44 |
version 1.22, 2015/01/19 20:07:45 |
|
|
|
|
extern ServerOptions options; |
extern ServerOptions options; |
|
|
static void input_gssapi_token(int type, u_int32_t plen, void *ctxt); |
static int input_gssapi_token(int type, u_int32_t plen, void *ctxt); |
static void input_gssapi_mic(int type, u_int32_t plen, void *ctxt); |
static int input_gssapi_mic(int type, u_int32_t plen, void *ctxt); |
static void input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt); |
static int input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt); |
static void input_gssapi_errtok(int, u_int32_t, void *); |
static int input_gssapi_errtok(int, u_int32_t, void *); |
|
|
/* |
/* |
* We only support those mechanisms that we know about (ie ones that we know |
* We only support those mechanisms that we know about (ie ones that we know |
|
|
return (0); |
return (0); |
} |
} |
|
|
static void |
static int |
input_gssapi_token(int type, u_int32_t plen, void *ctxt) |
input_gssapi_token(int type, u_int32_t plen, void *ctxt) |
{ |
{ |
Authctxt *authctxt = ctxt; |
Authctxt *authctxt = ctxt; |
|
|
} |
} |
|
|
gss_release_buffer(&min_status, &send_tok); |
gss_release_buffer(&min_status, &send_tok); |
|
return 0; |
} |
} |
|
|
static void |
static int |
input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) |
input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) |
{ |
{ |
Authctxt *authctxt = ctxt; |
Authctxt *authctxt = ctxt; |
|
|
/* The client will have already moved on to the next auth */ |
/* The client will have already moved on to the next auth */ |
|
|
gss_release_buffer(&maj_status, &send_tok); |
gss_release_buffer(&maj_status, &send_tok); |
|
return 0; |
} |
} |
|
|
/* |
/* |
|
|
* which only enables it once the GSSAPI exchange is complete. |
* which only enables it once the GSSAPI exchange is complete. |
*/ |
*/ |
|
|
static void |
static int |
input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt) |
input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt) |
{ |
{ |
Authctxt *authctxt = ctxt; |
Authctxt *authctxt = ctxt; |
|
|
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
|
return 0; |
} |
} |
|
|
static void |
static int |
input_gssapi_mic(int type, u_int32_t plen, void *ctxt) |
input_gssapi_mic(int type, u_int32_t plen, void *ctxt) |
{ |
{ |
Authctxt *authctxt = ctxt; |
Authctxt *authctxt = ctxt; |
|
|
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
|
return 0; |
} |
} |
|
|
Authmethod method_gssapi = { |
Authmethod method_gssapi = { |