summaryrefslogtreecommitdiffstats
path: root/src/clients/kinit
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>2009-12-14 18:28:16 +0000
committerSam Hartman <hartmans@mit.edu>2009-12-14 18:28:16 +0000
commitacd672680307a3f1bad828e6573fa34bd7779203 (patch)
tree1ae4e45b4ca1b11872c93a2b2bfd9f6810a4522b /src/clients/kinit
parent6899a43b722c3cb2672a38eba28490141d9bd32f (diff)
downloadkrb5-acd672680307a3f1bad828e6573fa34bd7779203.tar.gz
krb5-acd672680307a3f1bad828e6573fa34bd7779203.tar.xz
krb5-acd672680307a3f1bad828e6573fa34bd7779203.zip
fast negotiation projec
Merge branches/fast-negotiate into trunk. This implements http://k5wiki.kerberos.org/wiki/Projects/Fast_negotiation Additional changes: * krb5_c_make_checksum with checksum type 0 uses mandatory checksum for given key enctype Conflicts: src/lib/crypto/krb/make_checksum.c ticket: 6595 Tags: enhancement git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23465 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/clients/kinit')
-rw-r--r--src/clients/kinit/kinit.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c
index 96bb9cdcce..fdfae88286 100644
--- a/src/clients/kinit/kinit.c
+++ b/src/clients/kinit/kinit.c
@@ -629,6 +629,9 @@ k5_kinit(opts, k5)
goto cleanup;
}
}
+ code = krb5_get_init_creds_opt_set_out_ccache(k5->ctx, options, k5->cc);
+ if (code)
+ goto cleanup;
switch (opts->action) {
case INIT_PW:
@@ -678,20 +681,21 @@ k5_kinit(opts, k5)
goto cleanup;
}
- code = krb5_cc_initialize(k5->ctx, k5->cc,
- opts->canonicalize ? my_creds.client : k5->me);
- if (code) {
- com_err(progname, code, "when initializing cache %s",
- opts->k5_cache_name?opts->k5_cache_name:"");
- goto cleanup;
- }
+ if ((opts->action != INIT_PW) && (opts->action != INIT_KT)) {
+ code = krb5_cc_initialize(k5->ctx, k5->cc, opts->canonicalize ?
+ my_creds.client : k5->me);
+ if (code) {
+ com_err(progname, code, "when initializing cache %s",
+ opts->k5_cache_name?opts->k5_cache_name:"");
+ goto cleanup;
+ }
- code = krb5_cc_store_cred(k5->ctx, k5->cc, &my_creds);
- if (code) {
- com_err(progname, code, "while storing credentials");
- goto cleanup;
+ code = krb5_cc_store_cred(k5->ctx, k5->cc, &my_creds);
+ if (code) {
+ com_err(progname, code, "while storing credentials");
+ goto cleanup;
+ }
}
-
notix = 0;
cleanup: