Make krb5_get_init_creds_opt_free take a context argument.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19078 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -179,7 +179,7 @@ static OM_uint32 acquire_initiator_cred
|
||||
goto end;
|
||||
kret = krb5_get_init_creds_keytab(context, &cred,
|
||||
handle->principal, keytab, 0, NULL, opt);
|
||||
krb5_get_init_creds_opt_free(opt);
|
||||
krb5_get_init_creds_opt_free(context, opt);
|
||||
if (kret)
|
||||
goto end;
|
||||
kret = krb5_cc_gen_new(context, &krb5_mcc_ops,
|
||||
|
@@ -177,7 +177,7 @@ get_new_cache(krb5_context context,
|
||||
else
|
||||
ret = krb5_kt_resolve(context, keytab, &kt);
|
||||
if(ret) {
|
||||
krb5_get_init_creds_opt_free(opt);
|
||||
krb5_get_init_creds_opt_free(context, opt);
|
||||
return ret;
|
||||
}
|
||||
ret = krb5_get_init_creds_keytab (context,
|
||||
@@ -199,7 +199,7 @@ get_new_cache(krb5_context context,
|
||||
server_name,
|
||||
opt);
|
||||
}
|
||||
krb5_get_init_creds_opt_free(opt);
|
||||
krb5_get_init_creds_opt_free(context, opt);
|
||||
switch(ret){
|
||||
case 0:
|
||||
break;
|
||||
|
@@ -115,7 +115,7 @@ get_creds(krb5_context context, const char *keytab_str,
|
||||
ret = krb5_get_init_creds_keytab(context, &creds, client, keytab,
|
||||
0, server, init_opts);
|
||||
free (server);
|
||||
krb5_get_init_creds_opt_free(init_opts);
|
||||
krb5_get_init_creds_opt_free(context, init_opts);
|
||||
if(ret) krb5_err(context, 1, ret, "krb5_get_init_creds");
|
||||
|
||||
ret = krb5_kt_close(context, keytab);
|
||||
|
@@ -130,7 +130,8 @@ _krb5_get_init_creds_opt_set_krb5_error(krb5_context context,
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt)
|
||||
krb5_get_init_creds_opt_free(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt)
|
||||
{
|
||||
if (opt->opt_private == NULL)
|
||||
return;
|
||||
|
@@ -729,8 +729,8 @@ pa_etype_info2(krb5_context context,
|
||||
if (e.val[i].salt == NULL)
|
||||
krb5_free_salt(context, salt);
|
||||
if (ret == 0) {
|
||||
free_ETYPE_INFO2(&e);
|
||||
return paid;
|
||||
free_ETYPE_INFO2(&e);
|
||||
return paid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ krb5_get_init_creds_password(krb5_context context,
|
||||
ret = krb5_get_init_creds_opt_set_pa_password(context, options,
|
||||
password, NULL);
|
||||
if (ret) {
|
||||
krb5_get_init_creds_opt_free(options);
|
||||
krb5_get_init_creds_opt_free(context, options);
|
||||
memset(buf, 0, sizeof(buf));
|
||||
return ret;
|
||||
}
|
||||
@@ -1523,7 +1523,7 @@ krb5_get_init_creds_password(krb5_context context,
|
||||
|
||||
ret = krb5_get_init_creds(context, creds, client, prompter,
|
||||
data, start_time, in_tkt_service, options);
|
||||
krb5_get_init_creds_opt_free(options);
|
||||
krb5_get_init_creds_opt_free(context, options);
|
||||
memset(buf, 0, sizeof(buf));
|
||||
return ret;
|
||||
}
|
||||
|
@@ -72,6 +72,7 @@ Kerberos 5 Library (libkrb5, -lkrb5)
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fo krb5_get_init_creds_opt_free
|
||||
.Fa "krb5_context context"
|
||||
.Fa "krb5_get_init_creds_opt *opt"
|
||||
.Fc
|
||||
.Ft void
|
||||
|
@@ -172,7 +172,7 @@ verify_user_opt_int(krb5_context context,
|
||||
0,
|
||||
NULL,
|
||||
opt);
|
||||
krb5_get_init_creds_opt_free(opt);
|
||||
krb5_get_init_creds_opt_free(context, opt);
|
||||
if(ret)
|
||||
return ret;
|
||||
#define OPT(V, D) ((vopt && (vopt->V)) ? (vopt->V) : (D))
|
||||
|
Reference in New Issue
Block a user