From 64124151afeb04893b8a81ca59705afe496fef25 Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Wed, 8 Feb 1995 01:32:59 +0000 Subject: [PATCH] * krb_auth_su.c Removed krb5_keytype, changed krb5_enctype to krb5_enctype *, changed krb5_preauthtype to krb5_preauthtype * for krb5_get_in_tkt_with_password() rotuine. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4918 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/ksu/ChangeLog | 6 ++++++ src/clients/ksu/krb_auth_su.c | 34 +++++----------------------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index 9e91d4c56..93ccbd533 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,9 @@ +Mon Feb 06 17:19:04 1995 Chris Provenzano (proven@mit.edu) + + * krb_auth_su.c Removed krb5_keytype, changed krb5_enctype to + krb5_enctype *, changed krb5_preauthtype to krb5_preauthtype * + for krb5_get_in_tkt_with_password() rotuine. + Sat Jan 28 14:45:55 1995 Chris Provenzano (proven@mit.edu) * krb_auth_su.c (krb5_verify_tkt_def()) use new API for diff --git a/src/clients/ksu/krb_auth_su.c b/src/clients/ksu/krb_auth_su.c index 20f4da6f4..9e7e153da 100644 --- a/src/clients/ksu/krb_auth_su.c +++ b/src/clients/ksu/krb_auth_su.c @@ -46,11 +46,8 @@ krb5_data tgtname = { /* * Try no preauthentication first; then try the encrypted timestamp */ -int preauth_search_list[] = { - 0, - KRB5_PADATA_ENC_TIMESTAMP, - -1 - }; +krb5_preauthtype preauth_list[2] = { 0, -1 }; +krb5_preauthtype * preauth_ptr = NULL; @@ -384,7 +381,6 @@ krb5_boolean krb5_get_tkt_via_passwd (context, ccache, client, server, krb5_error_code code; krb5_creds my_creds; krb5_timestamp now; - int preauth_type = -1; int pwsize; int i; char password[255], *client_name, prompt[255]; @@ -452,29 +448,9 @@ krb5_boolean krb5_get_tkt_via_passwd (context, ccache, client, server, return (FALSE); } - if (preauth_type > 0) { - code = krb5_get_in_tkt_with_password(context, options->opt, - my_addresses, preauth_type, - ETYPE_DES_CBC_CRC, - KEYTYPE_DES, - password, - *ccache, - &my_creds, 0); - } else { - for (i=0; preauth_search_list[i] >= 0; i++) { - code = krb5_get_in_tkt_with_password(context, options->opt, - my_addresses, - preauth_search_list[i], - ETYPE_DES_CBC_CRC, - KEYTYPE_DES, - password, - *ccache, - &my_creds, 0); - if (code != KRB5KDC_ERR_PREAUTH_FAILED && - code != KRB5KRB_ERR_GENERIC) - break; - } - } + code = krb5_get_in_tkt_with_password(context, options->opt, + my_addresses, NULL, preauth_ptr, + password, *ccache, &my_creds, 0); memset(password, 0, sizeof(password)); -- 2.26.2