static void input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt);
static void input_gssapi_errtok(int, u_int32_t, void *);
-static int gssapi_with_mic = 1; /* flag to toggle "gssapi-with-mic" vs.
- "gssapi" */
-
-static int
-userauth_external(Authctxt *authctxt)
-{
- packet_check_eom();
-
- if (authctxt->valid && authctxt->user && authctxt->user[0]) {
- return(PRIVSEP(ssh_gssapi_userok(authctxt->user, authctxt->pw)));
- }
- return 0;
-}
-
/*
* The 'gssapi_keyex' userauth mechanism.
*/
}
authctxt->postponed = 0;
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
- userauth_finish(authctxt, 0,
- gssapi_with_mic ? "gssapi-with-mic" :
- "gssapi");
+ userauth_finish(authctxt, 0, "gssapi-with-mic");
} else {
if (send_tok.length != 0) {
packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
}
if (maj_status == GSS_S_COMPLETE) {
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
- if (flags & GSS_C_INTEG_FLAG && gssapi_with_mic)
+ if (flags & GSS_C_INTEG_FLAG)
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC,
&input_gssapi_mic);
else
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
- userauth_finish(authctxt, authenticated,
- gssapi_with_mic ? "gssapi-with-mic" : "gssapi");
-}
-
-static int
-userauth_gssapi_with_mic(Authctxt *authctxt)
-{
- gssapi_with_mic = 1;
- return userauth_gssapi(authctxt);
-}
-
-static int
-userauth_gssapi_without_mic(Authctxt *authctxt)
-{
- gssapi_with_mic = 0;
- return userauth_gssapi(authctxt);
+ userauth_finish(authctxt, authenticated, "gssapi-with-mic");
}
static void
}
}
-Authmethod method_external = {
- "external-keyx",
- userauth_external,
- &options.gss_authentication
-};
-
Authmethod method_gsskeyex = {
"gssapi-keyex",
userauth_gsskeyex,
Authmethod method_gssapi = {
"gssapi-with-mic",
- userauth_gssapi_with_mic,
- &options.gss_authentication
-};
-
-Authmethod method_gssapi_compat = {
- "gssapi",
- userauth_gssapi_without_mic,
+ userauth_gssapi,
&options.gss_authentication
};
extern Authmethod method_kbdint;
extern Authmethod method_hostbased;
#ifdef GSSAPI
-extern Authmethod method_external;
extern Authmethod method_gsskeyex;
extern Authmethod method_gssapi;
-extern Authmethod method_gssapi_compat;
#endif
#ifdef JPAKE
extern Authmethod method_jpake;
&method_pubkey,
#ifdef GSSAPI
&method_gsskeyex,
- &method_external,
&method_gssapi,
- &method_gssapi_compat,
#endif
#ifdef JPAKE
&method_jpake,
#ifdef GSSAPI
if (user[0] == '\0') {
debug("received empty username for %s", method);
- if (strcmp(method, "external-keyx") == 0 ||
- strcmp(method, "gssapi-keyex") == 0) {
+ if (strcmp(method, "gssapi-keyex") == 0) {
char *lname = NULL;
PRIVSEP(ssh_gssapi_localname(&lname));
if (lname && lname[0] != '\0') {
.Cm password )
The default for this option is:
.Do gssapi-keyex ,
-external-keyx,
gssapi-with-mic,
hostbased,
publickey,
void userauth_jpake_cleanup(Authctxt *);
#ifdef GSSAPI
-int userauth_external(Authctxt *authctxt);
int userauth_gssapi(Authctxt *authctxt);
-int userauth_gssapi_with_mic(Authctxt *authctxt);
-int userauth_gssapi_without_mic(Authctxt *authctxt);
void input_gssapi_response(int type, u_int32_t, void *);
void input_gssapi_token(int type, u_int32_t, void *);
void input_gssapi_hash(int type, u_int32_t, void *);
NULL,
&options.gss_authentication,
NULL},
- {"external-keyx",
- userauth_external,
- NULL,
- &options.gss_authentication,
- NULL},
{"gssapi-with-mic",
userauth_gssapi,
NULL,
&options.gss_authentication,
NULL},
- {"gssapi",
- userauth_gssapi,
- NULL,
- &options.gss_authentication,
- NULL},
#endif
{"hostbased",
userauth_hostbased,
oid->length) == 0))
#endif
-int
-userauth_external(Authctxt *authctxt)
-{
- static int attempt = 0;
-
- if (attempt++ >= 1)
- return 0;
-
- /* The client MUST NOT try this method if initial key exchange
- was not performed using a GSSAPI-based key exchange
- method. */
- if (gss_kex_context == NULL) {
- debug2("gsskex not performed, skipping external-keyx");
- return 0;
- }
-
- debug2("userauth_external");
- packet_start(SSH2_MSG_USERAUTH_REQUEST);
-#ifdef GSI
- if (options.implicit && is_gsi_oid(gss_kex_context->oid)) {
- packet_put_cstring("");
- } else {
-#endif
- packet_put_cstring(authctxt->server_user);
-#ifdef GSI
- }
-#endif
- packet_put_cstring(authctxt->service);
- packet_put_cstring(authctxt->method->name);
- packet_send();
- packet_write_wait();
- return 1;
-}
int
userauth_gsskeyex(Authctxt *authctxt)
{
#define MGLUE_VERSION ""
#endif
-#define NCSA_VERSION " GLOBUS_GSSAPI_20091020"
+#define NCSA_VERSION " GLOBUS_GSSAPI_20100106"
#define SSH_VERSION "OpenSSH_5.3"