diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-07 03:31:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-07 03:31:11 +0000 |
commit | 0e5bcbfa6c0b83de7bd2013d2c0b74a1e4affa9d (patch) | |
tree | 7fc63bac9b590fed01526d15c9a0370ab797596e /usr.bin/sudo/auth | |
parent | 2f2d0a26cc415e1a04c84188bb0519d5b1ec64bb (diff) |
Sync with sudo 1.6.7p3; fixes kerberos 5 compilation issues w/ MIT kerberos.
Diffstat (limited to 'usr.bin/sudo/auth')
-rw-r--r-- | usr.bin/sudo/auth/kerb5.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/sudo/auth/kerb5.c b/usr.bin/sudo/auth/kerb5.c index 151b40573cd..358c4f18e37 100644 --- a/usr.bin/sudo/auth/kerb5.c +++ b/usr.bin/sudo/auth/kerb5.c @@ -65,9 +65,15 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: kerb5.c,v 1.14 2003/04/02 18:57:34 millert Exp $"; +static const char rcsid[] = "$Sudo: kerb5.c,v 1.16 2003/04/04 17:46:57 millert Exp $"; #endif /* lint */ +#ifdef HAVE_HEIMDAL +# define krb5_free_data_contents(c, d) krb5_data_free(d) +#else +# define krb5_principal_get_realm(c, p) (krb5_princ_realm(c, p)->data) +#endif + static int verify_krb_v5_tgt __P((krb5_context, krb5_ccache, char *)); static struct _sudo_krb5_data { krb5_context sudo_context; @@ -276,7 +282,7 @@ verify_krb_v5_tgt(sudo_context, ccache, auth_name) * and enctype is currently ignored anyhow.) */ if ((error = krb5_kt_read_service_key(sudo_context, NULL, princ, 0, - ETYPE_DES_CBC_MD5, &keyblock))) { + ENCTYPE_DES_CBC_MD5, &keyblock))) { /* Keytab or service key does not exist. */ log_error(NO_EXIT, "%s: host service key not found: %s", auth_name, @@ -301,7 +307,7 @@ verify_krb_v5_tgt(sudo_context, ccache, auth_name) NULL, NULL, NULL); cleanup: if (packet.data) - krb5_data_free(&packet); + krb5_free_data_contents(sudo_context, &packet); krb5_free_principal(sudo_context, princ); if (error) |