From 54c97cd0c435f78880d80541a20cf7f08928705d Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 21 Mar 2014 18:07:41 -0400 Subject: Improve salt type display in kadmin getprinc In krb5_salttype_to_string, output the salt type name we would recognize as input. In the output of getprinc, display the enctype and salt type in a form we would accept--either enctype:salttype if the salt type is not the default, or just the enctype if it is. Update t_mkey.py and t_salt.py to expect the new output format. Update documentation examples to show the new format. ticket: 5958 --- src/kadmin/cli/kadmin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/kadmin') diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 733e784c9..1ce30ee1c 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -1445,15 +1445,16 @@ kadmin_getprinc(int argc, char *argv[]) enctype, sizeof(enctype))) snprintf(enctype, sizeof(enctype), _(""), key_data->key_data_type[0]); - printf("Key: vno %d, %s, ", key_data->key_data_kvno, enctype); - if (key_data->key_data_ver > 1) { + printf("Key: vno %d, %s", key_data->key_data_kvno, enctype); + if (key_data->key_data_ver > 1 && + key_data->key_data_type[1] != KRB5_KDB_SALTTYPE_NORMAL) { if (krb5_salttype_to_string(key_data->key_data_type[1], salttype, sizeof(salttype))) snprintf(salttype, sizeof(salttype), _(""), key_data->key_data_type[1]); - printf("%s\n", salttype); - } else - printf(_("no salt\n")); + printf(":%s", salttype); + } + printf("\n"); } printf(_("MKey: vno %d\n"), dprinc.mkvno); -- cgit