From: Todd C. Miller Date: Wed, 13 Feb 2008 22:17:14 +0000 (+0000) Subject: Avoid Heimdal'isms introduced in the rev 1.32 rewrite of verify_krb_v5_tgt() X-Git-Tag: SUDO_1_7_0~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd2c345be90bdd9620af5fc7c1b852fe392b9730;p=sudo Avoid Heimdal'isms introduced in the rev 1.32 rewrite of verify_krb_v5_tgt() --- diff --git a/auth/kerb5.c b/auth/kerb5.c index 5a6d7d5f7..69ab9da0a 100644 --- a/auth/kerb5.c +++ b/auth/kerb5.c @@ -185,8 +185,10 @@ kerb5_verify(pw, pass, auth) error_message(error)); goto done; } +#ifdef HAVE_HEIMDAL krb5_get_init_creds_opt_set_default_flags(sudo_context, NULL, krb5_principal_get_realm(sudo_context, princ), opts); +#endif /* Note that we always obtain a new TGT to verify the user */ if ((error = krb5_get_init_creds_password(sudo_context, &credbuf, princ, @@ -217,8 +219,13 @@ kerb5_verify(pw, pass, auth) } done: - if (opts) + if (opts) { +#ifdef HAVE_HEIMDAL krb5_get_init_creds_opt_free(opts); +#else + krb5_get_init_creds_opt_free(sudo_context, opts); +#endif + } if (creds) krb5_free_cred_contents(sudo_context, creds); return (error ? AUTH_FAILURE : AUTH_SUCCESS);