$NetBSD$

--- kadmin/server/misc.c.orig	2004-10-29 01:41:10.000000000 +0200
+++ kadmin/server/misc.c
@@ -149,3 +149,12 @@ check_min_life(void *server_handle, krb5
 
     return kadm5_free_principal_ent(handle->lhandle, &princ);
 }
+
+#define MAXPRINCLEN 125
+
+void
+trunc_name(size_t *len, char **dots)
+{
+	*dots = *len > MAXPRINCLEN ? "..." : "";
+	*len = *len > MAXPRINCLEN ? MAXPRINCLEN : *len;
+}
