From 751092f92154d3c9a593520117a60a629a51dce5 Mon Sep 17 00:00:00 2001 From: djm Date: Wed, 14 May 2003 04:31:11 +0000 Subject: [PATCH] - (djm) Make portable build with MIT krb5 (some issues remain) --- ChangeLog | 1 + Makefile.in | 2 +- auth-krb5.c | 1 + auth2-krb5.c | 4 ++++ sshconnect2.c | 10 ++++++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index be6449e8..34d6b517 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,6 +67,7 @@ [auth2.c monitor.c sshconnect2.c auth2-krb5.c] implement kerberos over ssh2 ("kerberos-2@ssh.com"); tested with jakob@ server interops with commercial client; ok jakob@ djm@ + - (djm) Make portable build with MIT krb5 (some issues remain) 20030512 - (djm) Redhat spec: Don't install profile.d scripts when not diff --git a/Makefile.in b/Makefile.in index dc0eabd3..5b3b7be8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,7 +80,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ auth2-none.o auth2-passwd.o auth2-pubkey.o \ monitor_mm.o monitor.o monitor_wrap.o monitor_fdpass.o \ kexdhs.o kexgexs.o \ - auth-krb5.o auth-krb4.o \ + auth-krb5.o auth2-krb5.o auth-krb4.o \ loginrec.o auth-pam.o auth-sia.o md5crypt.o MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out diff --git a/auth-krb5.c b/auth-krb5.c index 34b9d661..0a6f826e 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -40,6 +40,7 @@ RCSID("$OpenBSD: auth-krb5.c,v 1.10 2002/11/21 23:03:51 deraadt Exp $"); #include "auth.h" #ifdef KRB5 + #include #ifndef HEIMDAL #define krb5_get_err_text(context,code) error_message(code) diff --git a/auth2-krb5.c b/auth2-krb5.c index ea4d76da..b4ff16b6 100644 --- a/auth2-krb5.c +++ b/auth2-krb5.c @@ -25,6 +25,8 @@ #include "includes.h" RCSID("$OpenBSD: auth2-krb5.c,v 1.1 2003/05/14 02:15:47 markus Exp $"); +#ifdef KRB5 + #include #include "ssh2.h" @@ -64,3 +66,5 @@ Authmethod method_kerberos = { userauth_kerberos, &options.kerberos_authentication }; + +#endif /* KRB5 */ diff --git a/sshconnect2.c b/sshconnect2.c index 0605e4e5..f91f5b27 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -27,8 +27,13 @@ RCSID("$OpenBSD: sshconnect2.c,v 1.118 2003/05/14 02:15:47 markus Exp $"); #ifdef KRB5 #include +#ifndef HEIMDAL +#define krb5_get_err_text(context,code) error_message(code) +#endif /* !HEIMDAL */ #endif +#include "openbsd-compat/sys-queue.h" + #include "ssh.h" #include "ssh2.h" #include "xmalloc.h" @@ -1206,7 +1211,12 @@ userauth_kerberos(Authctxt *authctxt) packet_put_string(ap.data, ap.length); packet_send(); +#ifdef HEIMDAL krb5_data_free(&ap); +#else +# warning "XXX - leaks ap data on MIT kerberos" +#endif + return (1); } #endif -- 2.45.1