From: Chris Provenzano Date: Thu, 23 Feb 1995 13:23:12 +0000 (+0000) Subject: * kerberos5.c (kerberos5_send(), kerberos5_forward()) X-Git-Tag: krb5-1.0-beta5~682 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cbd1b69db709fe907bf764d30b7b667ede8f34bc;p=krb5.git * kerberos5.c (kerberos5_send(), kerberos5_forward()) Call krb5_get_credentials() and krb5_mk_req_extended() with new calling convention. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4986 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index b3ff8064c..5d85f83c9 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,9 @@ +Tue Feb 14 15:30:55 1995 Chris Provenzano (proven@mit.edu) + + * kerberos5.c (kerberos5_send(), kerberos5_forward()) + Call krb5_get_credentials() and krb5_mk_req_extended() + with new calling convention. + Thu Feb 2 02:56:50 1995 John Gilmore * forward.c: Remove unused #include . diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index 510e89d24..124b0f37d 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -179,6 +179,7 @@ kerberos5_send(ap) krb5_error_code r; krb5_ccache ccache; krb5_creds creds; /* telnet gets session key from here */ + krb5_creds * new_creds; extern krb5_flags krb5_kdc_default_options; int ap_opts; @@ -218,7 +219,7 @@ kerberos5_send(ap) } if (r = krb5_get_credentials(telnet_context, krb5_kdc_default_options, - ccache, &creds)) { + ccache, &creds, &new_creds)) { if (auth_debug_mode) { printf("Kerberos V5: failure on credentials(%s)\r\n", error_message(r)); @@ -233,14 +234,13 @@ kerberos5_send(ap) ap_opts = 0; r = krb5_mk_req_extended(telnet_context, ap_opts, - (krb5_checksum *) NULL, - krb5_kdc_default_options, 0, + (krb5_checksum *) NULL, 0, #ifdef ENCRYPTION &newkey, #else /* ENCRYPTION */ 0, #endif /* ENCRYPTION */ - ccache, &creds, &authenticator, &auth); + &creds, &authenticator, &auth); /* don't let the key get freed if we clean up the authenticator */ authenticator.subkey = 0; @@ -251,9 +251,9 @@ kerberos5_send(ap) /* keep the key in our private storage, but don't use it yet---see kerberos5_reply() below */ if (newkey->keytype != KEYTYPE_DES) { - if (creds.keyblock.keytype == KEYTYPE_DES) + if (new_creds->keyblock.keytype == KEYTYPE_DES) /* use the session key in credentials instead */ - krb5_copy_keyblock_contents(telnet_context, &creds, + krb5_copy_keyblock_contents(telnet_context, new_creds, &session_key); else /* XXX ? */; @@ -264,6 +264,7 @@ kerberos5_send(ap) } #endif /* ENCRYPTION */ krb5_free_cred_contents(telnet_context, &creds); + krb5_free_creds(telnet_context, new_creds); if (r) { if (auth_debug_mode) { printf("Kerberos V5: mk_req failed (%s)\r\n", @@ -607,7 +608,7 @@ kerberos5_printsub(data, cnt, buf, buflen) kerberos5_forward(ap) Authenticator *ap; { - krb5_creds *local_creds; + krb5_creds *local_creds, * new_creds; krb5_error_code r; krb5_data forw_creds; extern krb5_cksumtype krb5_kdc_req_sumtype; @@ -647,25 +648,27 @@ kerberos5_forward(ap) /* Get ticket from credentials cache */ if (r = krb5_get_credentials(telnet_context, KRB5_GC_CACHED, - ccache, local_creds)) { + ccache, local_creds, &new_creds)) { if (auth_debug_mode) printf("Kerberos V5: could not obtain credentials - %s\r\n", error_message(r)); krb5_free_creds(telnet_context, local_creds); + krb5_free_creds(telnet_context, new_creds); return; } if (r = krb5_get_for_creds(telnet_context, krb5_kdc_req_sumtype, RemoteHostName, - local_creds->client, - &local_creds->keyblock, + new_creds->client, + &new_creds->keyblock, forward_flags & OPTS_FORWARDABLE_CREDS, &forw_creds)) { if (auth_debug_mode) printf("Kerberos V5: error getting forwarded creds - %s\r\n", error_message(r)); krb5_free_creds(telnet_context, local_creds); + krb5_free_creds(telnet_context, new_creds); return; } @@ -680,6 +683,7 @@ kerberos5_forward(ap) } krb5_free_creds(telnet_context, local_creds); + krb5_free_creds(telnet_context, new_creds); } #endif /* FORWARD */