summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/auth/kerb5.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2008-07-31 16:44:05 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2008-07-31 16:44:05 +0000
commitdaf52ae7d678fa3f43b85be9091b54cbcd05a4fe (patch)
tree222e97fd4aba175d8178530baff52eed106a060a /usr.bin/sudo/auth/kerb5.c
parent6960c6b7f96163e79aa75b0ef330c8c13fc523bd (diff)
Update to sudo 1.6.9p17
Diffstat (limited to 'usr.bin/sudo/auth/kerb5.c')
-rw-r--r--usr.bin/sudo/auth/kerb5.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/sudo/auth/kerb5.c b/usr.bin/sudo/auth/kerb5.c
index 763ce851b0d..89d43a7dd85 100644
--- a/usr.bin/sudo/auth/kerb5.c
+++ b/usr.bin/sudo/auth/kerb5.c
@@ -54,7 +54,7 @@
#include "sudo_auth.h"
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: kerb5.c,v 1.23.2.7 2008/01/13 14:54:40 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: kerb5.c,v 1.23.2.8 2008/02/13 22:17:41 millert Exp $";
#endif /* lint */
#ifdef HAVE_HEIMDAL
@@ -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);