(krb5_get_init_creds_keytab): use krb5_keytab_key_proc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4472 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -554,7 +554,7 @@ krb5_get_init_creds_keytab(krb5_context context,
|
|||||||
krb5_enctype *etypes = NULL;
|
krb5_enctype *etypes = NULL;
|
||||||
krb5_preauthtype *pre_auth_types = NULL;
|
krb5_preauthtype *pre_auth_types = NULL;
|
||||||
krb5_creds this_cred;
|
krb5_creds this_cred;
|
||||||
krb5_keytab_entry kt_ent;
|
krb5_keytab_key_proc_args *a;
|
||||||
|
|
||||||
ret = get_init_creds_common(context, creds, client, start_time,
|
ret = get_init_creds_common(context, creds, client, start_time,
|
||||||
in_tkt_service, options,
|
in_tkt_service, options,
|
||||||
@@ -563,14 +563,13 @@ krb5_get_init_creds_keytab(krb5_context context,
|
|||||||
if(ret)
|
if(ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = krb5_kt_get_entry(context,
|
a = malloc (sizeof(*a));
|
||||||
keytab,
|
if (a == NULL) {
|
||||||
this_cred.client,
|
ret = ENOMEM;
|
||||||
0,
|
|
||||||
KEYTYPE_DES,
|
|
||||||
&kt_ent);
|
|
||||||
if(ret)
|
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
a->principal = this_cred.client;
|
||||||
|
a->keytab = keytab;
|
||||||
|
|
||||||
ret = krb5_get_in_cred (context,
|
ret = krb5_get_in_cred (context,
|
||||||
flags.i,
|
flags.i,
|
||||||
@@ -578,13 +577,12 @@ krb5_get_init_creds_keytab(krb5_context context,
|
|||||||
etypes,
|
etypes,
|
||||||
pre_auth_types,
|
pre_auth_types,
|
||||||
NULL,
|
NULL,
|
||||||
krb5_keyblock_key_proc,
|
krb5_keytab_key_proc,
|
||||||
&kt_ent.keyblock,
|
a,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&this_cred,
|
&this_cred,
|
||||||
NULL);
|
NULL);
|
||||||
krb5_kt_free_entry(context, &kt_ent);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
free (pre_auth_types);
|
free (pre_auth_types);
|
||||||
|
Reference in New Issue
Block a user