[11450] in Kerberos-V5-bugs
[krbdev.mit.edu #6684] Simple kinit verbosity patch
daemon@ATHENA.MIT.EDU (Jeff Blaine via RT)
Fri Mar 12 17:09:56 2010
Mail-followup-to: rt@krbdev.mit.edu
mail-copies-to: never
From: "Jeff Blaine via RT" <rt-comment@krbdev.MIT.EDU>
In-Reply-To: <rt-6684@krbdev.mit.edu>
Message-ID: <rt-6684-32586.10.2046556445681@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #6684'":;"'AdminCc of krbdev.mit.edu Ticket #6684'":;@MIT.EDU
Date: Fri, 12 Mar 2010 17:09:53 -0500 (EST)
Reply-To: rt-comment@krbdev.MIT.EDU
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
--- kinit.c 2010-03-12 16:28:36.000000000 -0500
+++ ../../../../PRISTINE-DONT-MOD-krb5-1.8/src/clients/kinit/kinit.c 2009-12-28 13:03:31.000000000 -0500
@@ -455,9 +455,6 @@
com_err(progname, code, "resolving ccache %s",
opts->k5_cache_name);
return 0;
- } else {
- if (opts->verbose)
- fprintf(stderr, "Using specified cache: %s\n", opts->k5_cache_name);
}
}
else
@@ -465,9 +462,6 @@
if ((code = krb5_cc_default(k5->ctx, &k5->cc))) {
com_err(progname, code, "while getting default ccache");
return 0;
- } else {
- if (opts->verbose)
- fprintf(stderr, "Using default cache: %s\n", krb5_cc_default_name(k5->ctx));
}
}
@@ -525,7 +519,6 @@
return 0;
}
} else {
- /* not anonymous, not keytab */
/* Get default principal from cache if one exists */
code = krb5_cc_get_principal(k5->ctx, k5->cc,
&k5->me);
@@ -551,9 +544,6 @@
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;
@@ -606,14 +596,14 @@
memset(&my_creds, 0, sizeof(my_creds));
code = krb5_get_init_creds_opt_alloc(k5->ctx, &options);
+ if (code)
+ goto cleanup;
+
/*
From this point on, we can goto cleanup because my_creds is
initialized.
*/
- if (code)
- goto cleanup;
-
if (opts->lifetime)
krb5_get_init_creds_opt_set_tkt_life(options, opts->lifetime);
if (opts->rlife)
@@ -653,9 +643,6 @@
com_err(progname, code, "resolving keytab %s",
opts->keytab_name);
goto cleanup;
- } else {
- if (opts->verbose)
- fprintf(stderr, "Using keytab: %s\n", opts->keytab_name);
}
}
@@ -667,9 +654,6 @@
com_err(progname, code, "while setting '%s'='%s'",
opts->pa_opts[i].attr, opts->pa_opts[i].value);
goto cleanup;
- } else {
- 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);
@@ -731,18 +715,12 @@
com_err(progname, code, "when initializing cache %s",
opts->k5_cache_name?opts->k5_cache_name:"");
goto cleanup;
- } else {
- 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;
- } else {
- if (opts->verbose)
- fprintf(stderr, "Stored credentials\n");
}
}
notix = 0;
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs