summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/krb5/kadmin/ktutil/ktutil.c15
-rw-r--r--usr/src/cmd/krb5/klist/klist.c6
2 files changed, 13 insertions, 8 deletions
diff --git a/usr/src/cmd/krb5/kadmin/ktutil/ktutil.c b/usr/src/cmd/krb5/kadmin/ktutil/ktutil.c
index 848a14da62..317e1f3155 100644
--- a/usr/src/cmd/krb5/kadmin/ktutil/ktutil.c
+++ b/usr/src/cmd/krb5/kadmin/ktutil/ktutil.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -318,10 +318,15 @@ void ktutil_list(argc, argv)
static char buf[256];
if ((retval = krb5_enctype_to_string(
lp->entry->key.enctype, buf, 256))) {
- com_err(argv[0], retval,
- gettext("While converting "
- "enctype to string"));
- return;
+ if (retval == EINVAL)
+ snprintf(buf, sizeof(buf), gettext("unsupported encryption type %d"),
+ lp->entry->key.enctype);
+ else {
+ com_err(argv[0], retval,
+ gettext("While converting "
+ "enctype to string"));
+ return;
+ }
}
printf(" (%s) ", buf);
}
diff --git a/usr/src/cmd/krb5/klist/klist.c b/usr/src/cmd/krb5/klist/klist.c
index f564e6790b..22c9a152ef 100644
--- a/usr/src/cmd/krb5/klist/klist.c
+++ b/usr/src/cmd/krb5/klist/klist.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -526,12 +526,12 @@ char *
etype_string(enctype)
krb5_enctype enctype;
{
- static char buf[100];
+ static char buf[256];
krb5_error_code retval;
if ((retval = krb5_enctype_to_string(enctype, buf, sizeof(buf)))) {
/* XXX if there's an error != EINVAL, I should probably report it */
- sprintf(buf, gettext("etype %d"), enctype);
+ snprintf(buf, sizeof(buf), gettext("unsupported encryption type %d"), enctype);
}
return buf;