]> andersk Git - gssapi-openssh.git/commitdiff
shrink gssapi compat code based on simon's compat patch
authorjbasney <jbasney>
Thu, 4 Mar 2004 20:31:42 +0000 (20:31 +0000)
committerjbasney <jbasney>
Thu, 4 Mar 2004 20:31:42 +0000 (20:31 +0000)
openssh/sshconnect2.c

index c9605d11696bb643e9c93d0dfb4cda3c78220fee..4da1990502bec354cf3ef9b0f602c2bbc77119bb 100644 (file)
@@ -267,9 +267,6 @@ static Authmethod *authmethod_get(char *authlist);
 static Authmethod *authmethod_lookup(const char *name);
 static char *authmethods_get(void);
 
-static int gssapi_with_mic = 1;        /* flag to toggle "gssapi-with-mic" vs.
-                                  "gssapi" */
-
 Authmethod authmethods[] = {
 #ifdef GSSAPI
        {"external-keyx",
@@ -277,11 +274,11 @@ Authmethod authmethods[] = {
                &options.gss_authentication,
                NULL},
        {"gssapi-with-mic",
-               userauth_gssapi_with_mic,
+               userauth_gssapi,
                &options.gss_authentication,
                NULL},
        {"gssapi",
-               userauth_gssapi_without_mic,
+               userauth_gssapi,
                &options.gss_authentication,
                NULL},
 #endif
@@ -606,20 +603,6 @@ userauth_gssapi(Authctxt *authctxt)
        return 1;
 }
 
-int
-userauth_gssapi_with_mic(Authctxt *authctxt)
-{
-    gssapi_with_mic = 1;
-    return userauth_gssapi(authctxt);
-}
-
-int
-userauth_gssapi_without_mic(Authctxt *authctxt)
-{
-    gssapi_with_mic = 0;
-    return userauth_gssapi(authctxt);
-}
-
 static OM_uint32
 process_gssapi_token(void *ctxt, gss_buffer_t recv_tok)
 {
@@ -646,7 +629,8 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok)
 
        if (status == GSS_S_COMPLETE) {
                /* send either complete or MIC, depending on mechanism */
-               if (!(flags & GSS_C_INTEG_FLAG) || !gssapi_with_mic) {
+               if (strcmp(authctxt->method->name,"gssapi")==0 ||
+                   (!(flags & GSS_C_INTEG_FLAG))) {
                        packet_start(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE);
                        packet_send();
                } else {
This page took 0.053487 seconds and 5 git commands to generate.