summaryrefslogtreecommitdiffstats
path: root/src/clients
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-03-17 20:16:32 +0000
committerGreg Hudson <ghudson@mit.edu>2010-03-17 20:16:32 +0000
commit7ce25ce72802f0719a234b3f8f98fce4baab057f (patch)
tree3a8475fcdb4e0ec311c841fa290ce76a3444bfa8 /src/clients
parentefe92b4d5aeffd34d88edcf489d4df2a115a54d9 (diff)
downloadkrb5-7ce25ce72802f0719a234b3f8f98fce4baab057f.tar.gz
krb5-7ce25ce72802f0719a234b3f8f98fce4baab057f.tar.xz
krb5-7ce25ce72802f0719a234b3f8f98fce4baab057f.zip
Add more verbosity when the -V option to kinit is specified. Based on
a patch from Jeff Blaine <jblaine@kickflop.net>. ticket: 6684 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23814 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/kinit/kinit.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c
index 9349f487a9..8eb059d3aa 100644
--- a/src/clients/kinit/kinit.c
+++ b/src/clients/kinit/kinit.c
@@ -456,6 +456,10 @@ k5_begin(opts, k5)
opts->k5_cache_name);
return 0;
}
+ if (opts->verbose) {
+ fprintf(stderr, "Using specified cache: %s\n",
+ opts->k5_cache_name);
+ }
}
else
{
@@ -463,6 +467,10 @@ k5_begin(opts, k5)
com_err(progname, code, "while getting default ccache");
return 0;
}
+ if (opts->verbose) {
+ fprintf(stderr, "Using default cache: %s\n",
+ krb5_cc_get_name(k5->ctx, k5->cc));
+ }
}
if (opts->principal_name)
@@ -544,6 +552,9 @@ k5_begin(opts, k5)
com_err(progname, code, "when unparsing name");
return 0;
}
+ if (opts->verbose)
+ fprintf(stderr, "Using principal: %s\n", k5->name);
+
opts->principal_name = k5->name;
return 1;
@@ -644,6 +655,8 @@ k5_kinit(opts, k5)
opts->keytab_name);
goto cleanup;
}
+ if (opts->verbose)
+ fprintf(stderr, "Using keytab: %s\n", opts->keytab_name);
}
for (i = 0; i < opts->num_pa_opts; i++) {
@@ -655,6 +668,10 @@ k5_kinit(opts, k5)
opts->pa_opts[i].attr, opts->pa_opts[i].value);
goto cleanup;
}
+ if (opts->verbose) {
+ fprintf(stderr, "PA Option %s = %s\n", opts->pa_opts[i].attr,
+ opts->pa_opts[i].value);
+ }
}
code = krb5_get_init_creds_opt_set_out_ccache(k5->ctx, options, k5->cc);
if (code)
@@ -716,12 +733,16 @@ k5_kinit(opts, k5)
opts->k5_cache_name?opts->k5_cache_name:"");
goto cleanup;
}
+ if (opts->verbose)
+ fprintf(stderr, "Initialized cache\n");
code = krb5_cc_store_cred(k5->ctx, k5->cc, &my_creds);
if (code) {
com_err(progname, code, "while storing credentials");
goto cleanup;
}
+ if (opts->verbose)
+ fprintf(stderr, "Stored credentials\n");
}
notix = 0;