svn rev #23414: branches/fast-negotiate/src/clients/kinit/
hartmans@MIT.EDU
hartmans at MIT.EDU
Wed Dec 2 11:16:26 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23414
Commit By: hartmans
Log Message:
Use krb5_get_init_creds_opt_set_out_ccache to set the output ccache for kinit.
Support this function in krb5_get_init_creds
Changed Files:
U branches/fast-negotiate/src/clients/kinit/kinit.c
Modified: branches/fast-negotiate/src/clients/kinit/kinit.c
===================================================================
--- branches/fast-negotiate/src/clients/kinit/kinit.c 2009-12-02 16:16:22 UTC (rev 23413)
+++ branches/fast-negotiate/src/clients/kinit/kinit.c 2009-12-02 16:16:26 UTC (rev 23414)
@@ -629,6 +629,9 @@
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 @@
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:
More information about the cvs-krb5
mailing list