use krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12737 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-03 00:31:42 +00:00
parent f287772b22
commit 61e14619de
9 changed files with 74 additions and 45 deletions

View File

@@ -37,15 +37,20 @@ static int
krb5_verify_password (POP *p)
{
krb5_preauthtype pre_auth_types[] = {KRB5_PADATA_ENC_TIMESTAMP};
krb5_get_init_creds_opt get_options;
krb5_get_init_creds_opt *get_options;
krb5_verify_init_creds_opt verify_options;
krb5_error_code ret;
krb5_principal client, server;
krb5_creds creds;
krb5_get_init_creds_opt_init (&get_options);
ret = krb5_get_init_creds_opt_alloc (&get_options);
if (ret) {
pop_log(p, POP_PRIORITY, "krb5_get_init_creds_opt_init: %s",
krb5_get_err_text (p->context, ret));
return 1;
}
krb5_get_init_creds_opt_set_preauth_list (&get_options,
krb5_get_init_creds_opt_set_preauth_list (get_options,
pre_auth_types,
1);
@@ -66,7 +71,8 @@ krb5_verify_password (POP *p)
NULL,
0,
NULL,
&get_options);
get_options);
krb5_get_init_creds_opt_free(get_options);
if (ret) {
pop_log(p, POP_PRIORITY,
"krb5_get_init_creds_password: %s",