]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
try the v2 mech, and if that fails, then the v1 mech
authorMarc Horowitz <marc@mit.edu>
Wed, 30 Sep 1998 05:47:08 +0000 (05:47 +0000)
committerMarc Horowitz <marc@mit.edu>
Wed, 30 Sep 1998 05:47:08 +0000 (05:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10953 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kadm5/clnt/client_init.c

index 11cd77c7483b6584f0f59b7f1b0fa557ea5e3d84..35cc1b627394c51e2ebb2af3d1ecc3cee78f5eaf 100644 (file)
@@ -444,12 +444,26 @@ static kadm5_ret_t _kadm5_init_any(char *client_name,
                                        &minor_stat,
                                        gss_client_creds,
                                        gss_target,
-                                       GSS_C_NULL_OID,
+                                       gss_mech_krb5_v2,
                                        GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
                                        0,
                                        NULL,
                                        NULL,
                                        NULL);
+
+     if (!handle->clnt->cl_auth)
+        handle->clnt->cl_auth = auth_gssapi_create(handle->clnt,
+                                       &gssstat,
+                                       &minor_stat,
+                                       gss_client_creds,
+                                       gss_target,
+                                       gss_mech_krb5,
+                                       GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
+                                       0,
+                                       NULL,
+                                       NULL,
+                                       NULL);
+
      (void) gss_release_name(&minor_stat, &gss_target);
 #endif /* ! INIT_TEST */