summaryrefslogtreecommitdiffstats
path: root/security/krb5-16/files/patch-kadmin-server-misc.c
blob: ed09a06ac7c67d28c619160f9d925a2e7ddaf60c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- kadmin/server/misc.c.orig	Sat Mar 11 14:23:28 2006
+++ kadmin/server/misc.c	Wed Apr  4 13:53:04 2007
@@ -171,3 +171,12 @@
 
     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;
+}
OpenPOWER on IntegriCloud