svn rev #24122: trunk/src/ clients/klist/ kadmin/cli/ kadmin/dbutil/ kadmin/ktutil/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Jun 8 13:53:19 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24122
Commit By: ghudson
Log Message:
ticket: 5014
When we display enctypes, display the input name rather than the
description. Affects klist -e, kdb5_util list_mkeys, kdb5_util stash
(error message), kadmin getprinc, kadmin ktadd, and ktutil list -e.
Changed Files:
U trunk/src/clients/klist/klist.c
U trunk/src/kadmin/cli/kadmin.c
U trunk/src/kadmin/cli/keytab.c
U trunk/src/kadmin/dbutil/kdb5_mkey.c
U trunk/src/kadmin/dbutil/kdb5_stash.c
U trunk/src/kadmin/ktutil/ktutil.c
Modified: trunk/src/clients/klist/klist.c
===================================================================
--- trunk/src/clients/klist/klist.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/clients/klist/klist.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -428,7 +428,7 @@
static char buf[100];
krb5_error_code retval;
- if ((retval = krb5_enctype_to_string(enctype, buf, sizeof(buf)))) {
+ if ((retval = krb5_enctype_to_name(enctype, FALSE, buf, sizeof(buf)))) {
/* XXX if there's an error != EINVAL, I should probably report it */
snprintf(buf, sizeof(buf), "etype %d", enctype);
}
Modified: trunk/src/kadmin/cli/kadmin.c
===================================================================
--- trunk/src/kadmin/cli/kadmin.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/kadmin/cli/kadmin.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -1380,8 +1380,8 @@
krb5_key_data *key_data = &dprinc.key_data[i];
char enctype[BUFSIZ], salttype[BUFSIZ];
- if (krb5_enctype_to_string(key_data->key_data_type[0],
- enctype, sizeof(enctype)))
+ if (krb5_enctype_to_name(key_data->key_data_type[0], FALSE,
+ enctype, sizeof(enctype)))
snprintf(enctype, sizeof(enctype), "<Encryption type 0x%x>",
key_data->key_data_type[0]);
printf("Key: vno %d, %s, ", key_data->key_data_kvno, enctype);
Modified: trunk/src/kadmin/cli/keytab.c
===================================================================
--- trunk/src/kadmin/cli/keytab.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/kadmin/cli/keytab.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -473,7 +473,7 @@
static char buf[100];
krb5_error_code ret;
- ret = krb5_enctype_to_string(enctype, buf, sizeof(buf));
+ ret = krb5_enctype_to_name(enctype, FALSE, buf, sizeof(buf));
if (ret)
snprintf(buf, sizeof(buf), "etype %d", enctype);
Modified: trunk/src/kadmin/dbutil/kdb5_mkey.c
===================================================================
--- trunk/src/kadmin/dbutil/kdb5_mkey.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/kadmin/dbutil/kdb5_mkey.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -668,8 +668,8 @@
for (cur_kb_node = master_keylist; cur_kb_node != NULL;
cur_kb_node = cur_kb_node->next) {
- if ((retval = krb5_enctype_to_string(cur_kb_node->keyblock.enctype,
- enctype, sizeof(enctype)))) {
+ if ((retval = krb5_enctype_to_name(cur_kb_node->keyblock.enctype,
+ FALSE, enctype, sizeof(enctype)))) {
com_err(progname, retval, "while getting enctype description");
exit_status++;
goto cleanup_return;
Modified: trunk/src/kadmin/dbutil/kdb5_stash.c
===================================================================
--- trunk/src/kadmin/dbutil/kdb5_stash.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/kadmin/dbutil/kdb5_stash.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -118,7 +118,8 @@
if (!krb5_c_valid_enctype(master_keyblock.enctype)) {
char tmp[32];
- if (krb5_enctype_to_string(master_keyblock.enctype, tmp, sizeof(tmp)))
+ if (krb5_enctype_to_name(master_keyblock.enctype, FALSE,
+ tmp, sizeof(tmp)))
com_err(progname, KRB5_PROG_KEYTYPE_NOSUPP,
"while setting up enctype %d", master_keyblock.enctype);
else
Modified: trunk/src/kadmin/ktutil/ktutil.c
===================================================================
--- trunk/src/kadmin/ktutil/ktutil.c 2010-06-08 16:26:23 UTC (rev 24121)
+++ trunk/src/kadmin/ktutil/ktutil.c 2010-06-08 17:53:19 UTC (rev 24122)
@@ -252,8 +252,8 @@
printf("%40s", pname);
if (show_enctype) {
static char buf[256];
- if ((retval = krb5_enctype_to_string(
- lp->entry->key.enctype, buf, 256))) {
+ if ((retval = krb5_enctype_to_name(lp->entry->key.enctype, FALSE,
+ buf, sizeof(buf)))) {
com_err(argv[0], retval, "While converting enctype to string");
return;
}
More information about the cvs-krb5
mailing list