From c5f40f105f0c30051da855511d43376b17a05ef6 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 29 Sep 1992 14:43:06 +0000 Subject: [PATCH] Added support for preauthentication git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2442 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/hammer/kdc5_hammer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/tests/hammer/kdc5_hammer.c b/src/tests/hammer/kdc5_hammer.c index 3aaebad01..bb7f60047 100644 --- a/src/tests/hammer/kdc5_hammer.c +++ b/src/tests/hammer/kdc5_hammer.c @@ -83,12 +83,13 @@ int status; "usage: %s -p prefix -n num_to_check [-d dbpathname] [-r realmname]\n", who); fprintf(stderr, "\t [-D depth] [-k keytype] [-e etype] [-M mkeyname]\n"); - fprintf(stderr, "\t [-r repeat_count]\n"); + fprintf(stderr, "\t [-P preauth type] [-r repeat_count]\n"); exit(status); } static krb5_enctype etype = 0xffff; +static krb5_preauthtype patype = KRB5_PADATA_NONE; static krb5_keytype keytype; void @@ -123,7 +124,7 @@ main(argc, argv) errors = 0; keytypedone = 0; - while ((option = getopt(argc, argv, "D:p:n:c:r:k:e:bv")) != EOF) { + while ((option = getopt(argc, argv, "D:p:n:c:r:k:P:e:bv")) != EOF) { switch (option) { case 'b': brief = 1; @@ -150,6 +151,9 @@ main(argc, argv) case 'e': etype = atoi(optarg); break; + case 'P': + patype = atoi(optarg); + break; case 'c': if (ccache == NULL) { cache_name = optarg; @@ -423,11 +427,12 @@ int get_tgt (p_client_str, p_client, ccache) my_creds.times.renew_till = 0; code = krb5_get_in_tkt_with_password(options, my_addresses, + patype, etype, keytype, p_client_str, ccache, - &my_creds); + &my_creds, 0); my_creds.server = my_creds.client = 0; krb5_free_principal(tgt_server); krb5_free_addresses(my_addresses); -- 2.26.2