Raise the limit on the length of user names to the most utmp will allow. Based on a patch by Rik Brown. diff -up krb5/src/appl/bsd/krshd.c krb5-1.6.1/src/appl/bsd/krshd.c --- krb5/src/appl/bsd/krshd.c 2010-09-09 16:00:45.836924000 -0400 +++ krb5/src/appl/bsd/krshd.c 2010-09-09 17:19:16.205923995 -0400 @@ -195,6 +195,13 @@ Key_schedule v4_schedule; #define ARGSTR "ek54ciD:S:M:AP:?L:w:" +#ifdef HAVE_UTMP_H +#include <utmp.h> +#endif + +#ifndef UT_NAMESIZE /* linux defines it directly in <utmp.h> */ +#define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name) +#endif @@ -486,7 +493,7 @@ char username[32] = "LOGNAME="; #include <tmpdir.h> char tmpdir[64] = "TMPDIR="; #else -char username[20] = "USER="; +char username[UT_NAMESIZE + 6] = "USER="; #endif char homedir[64] = "HOME="; @@ -536,7 +543,7 @@ int maxlogs; #define NCARGS 1024 #endif -#define NMAX 16 +#define NMAX UT_NAMESIZE int pid; char locuser[NMAX+1];