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

@@ -60,7 +60,7 @@ main(int argc, char **argv)
krb5_error_code ret;
krb5_creds cred;
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;
int optind = 0;
@@ -81,9 +81,11 @@ main(int argc, char **argv)
if (ret)
errx (1, "krb5_init_context failed: %d", ret);
krb5_get_init_creds_opt_init (&get_options);
ret = krb5_get_init_creds_opt_alloc (&get_options);
if (ret)
krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
krb5_get_init_creds_opt_set_preauth_list (&get_options,
krb5_get_init_creds_opt_set_preauth_list (get_options,
pre_auth_types,
1);
@@ -97,7 +99,7 @@ main(int argc, char **argv)
NULL,
0,
NULL,
&get_options);
get_options);
if (ret)
errx (1, "krb5_get_init_creds: %s", krb5_get_err_text(context, ret));