From: Theodore Tso <tytso@mit.edu>
Date: Tue, 29 Sep 1992 14:43:06 +0000 (+0000)
Subject: Added support for preauthentication
X-Git-Tag: krb5-1.0-beta2~20
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c5f40f105f0c30051da855511d43376b17a05ef6;p=krb5.git

Added support for preauthentication

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2442 dc483132-0cff-0310-8789-dd5450dbe970
---

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);