From: Ezra Peisach Date: Wed, 24 May 1995 15:05:01 +0000 (+0000) Subject: kerberos5.c: Include string.h/strings.h. Include stdlib.h or X-Git-Tag: krb5-1.0-beta6~1936 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=993be400fbb539b662e3c3defda5997368f331fd;p=krb5.git kerberos5.c: Include string.h/strings.h. Include stdlib.h or declare malloc. (kerberos5_send): Fix improperly closed comment krb5_get_credentials second argument is not kdc_options configure.in (LIBOBJS): Removed duplicate WITH_KRB4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5861 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index 462716631..cf3176c8a 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,16 @@ +Wed May 24 10:29:54 1995 Ezra Peisach + + * kerberos5.c: Include string.h/strings.h. Include stdlib.h or + declare malloc. + +Sun May 7 18:45:09 1995 Ezra Peisach + + * kerberos5.c (kerberos5_send): Fix improperly closed comment + krb5_get_credentials second argument is not + kdc_options.... + + * configure.in (LIBOBJS): Removed duplicate WITH_KRB4 + Fri Apr 28 11:17:16 1995 Mark Eichin * configure.in: switch to WITH_KRB4 since it suffices in this case. diff --git a/src/appl/telnet/libtelnet/configure.in b/src/appl/telnet/libtelnet/configure.in index a332957d9..bd810b82b 100644 --- a/src/appl/telnet/libtelnet/configure.in +++ b/src/appl/telnet/libtelnet/configure.in @@ -11,5 +11,4 @@ LIBOBJS="$LIBOBJS getent.o" KRB_INCLUDE WITH_KRB4 AC_CONST -WITH_KRB4 V5_AC_OUTPUT_MAKEFILE diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index 3c294bcab..46816bcd4 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -66,8 +66,16 @@ #include #include -/* kerberos 5 include files (ext-proto.h) will get an appropriate stdlib.h - and string.h/strings.h */ +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(); +#endif +#ifdef NO_STRING_H +#include +#else +#include +#endif #include "encrypt.h" #include "auth.h" @@ -181,7 +189,7 @@ kerberos5_send(ap) krb5_error_code r; krb5_ccache ccache; krb5_creds creds; /* telnet gets session key from here */ - krb5_creds * new_creds; + krb5_creds * new_creds = 0; extern krb5_flags krb5_kdc_default_options; int ap_opts; @@ -233,7 +241,7 @@ kerberos5_send(ap) return(0); } - if (r = krb5_get_credentials(telnet_context, krb5_kdc_default_options, + if (r = krb5_get_credentials(telnet_context, 0, ccache, &creds, &new_creds)) { if (auth_debug_mode) { printf("Kerberos V5: failure on credentials(%s)\r\n", @@ -273,7 +281,7 @@ kerberos5_send(ap) /* * keep the key in our private storage, but don't use it yet * ---see kerberos5_reply() below - * / + */ if (newkey && (newkey->keytype != KEYTYPE_DES)) { if (new_creds->keyblock.keytype == KEYTYPE_DES) /* use the session key in credentials instead */