From: Marc Horowitz Date: Wed, 30 Sep 1998 05:47:08 +0000 (+0000) Subject: try the v2 mech, and if that fails, then the v1 mech X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bafb0a1aa28508bc425793f58cc583ddad4d7d43;p=thirdparty%2Fkrb5.git try the v2 mech, and if that fails, then the v1 mech git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10953 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index 11cd77c748..35cc1b6273 100644 --- a/src/lib/kadm5/clnt/client_init.c +++ b/src/lib/kadm5/clnt/client_init.c @@ -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 */