--- old/usr/src/cmd/grpck/grpck.c	Mon Mar 25 12:53:25 2013
+++ new/usr/src/cmd/grpck/grpck.c	Mon Mar 25 12:53:25 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -27,8 +29,6 @@
 /*	  All Rights Reserved  	*/
 
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/param.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -55,6 +55,12 @@
 #define	BLANKLINE "Blank line detected. Please remove line"
 #define	LONGNAME  "Group name too long"
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 int eflag, badchar, baddigit, badlognam, colons, len;
 static int longnam = 0;
 int code;
@@ -128,7 +134,7 @@
 
 	if ((fptr = fopen(argv[1], "r")) == NULL) {
 		fprintf(stderr, gettext("cannot open file %s: %s\n"), argv[1],
-			strerror(errno));
+		    strerror(errno));
 		exit(1);
 	}
 
@@ -143,7 +149,7 @@
 			t->groups = NULL;
 		else {
 			t->groups = (struct group *)
-				emalloc(sizeof (struct group));
+			    emalloc(sizeof (struct group));
 			t->groups->grp = pwp->pw_gid;
 			t->groups->cnt = 1;
 			t->groups->nxt = NULL;
@@ -185,7 +191,7 @@
 			code = 1;		/* exit with error code = 1 */
 			eflag = 0;	/* force print of "blank" line */
 			fprintf(stderr, "\n%s %d\n", gettext(BLANKLINE),
-				lineno);
+			    lineno);
 			continue;
 		}
 
@@ -247,7 +253,7 @@
 			error(NONAME);
 		else {
 			for (i = 0; buf[i] != ':'; i++) {
-				if (i >= LOGNAME_MAX)
+				if (i >= _LOGNAME_MAX)
 					longnam++;
 				if (!(islower(buf[i]) || isdigit(buf[i])))
 					badchar++;
@@ -316,7 +322,7 @@
 
 				/* Usrname found, so add entry to user-list */
 				t = (struct node *)
-					emalloc(sizeof (*t) + strlen(nptr));
+				    emalloc(sizeof (*t) + strlen(nptr));
 				t->next = root;
 				root = t;
 				strcpy(t->user, nptr);
@@ -325,7 +331,7 @@
 					t->groups = NULL;
 				else {
 					t->groups = (struct group *)
-						emalloc(sizeof (struct group));
+					    emalloc(sizeof (struct group));
 					t->groups->grp = pwp->pw_gid;
 					t->groups->cnt = 1;
 					t->groups->nxt = NULL;
@@ -374,7 +380,7 @@
 		for (t = root; t != NULL; t = t->next) {
 			if (t->ngroups > ngroups_max) {
 				fprintf(stderr, "\n\n%s%s (%d)\n",
-				NGROUPS, t->user, t->ngroups);
+				    NGROUPS, t->user, t->ngroups);
 				code = 1;
 			}
 		}
--- old/usr/src/cmd/newtask/newtask.c	Mon Mar 25 12:53:25 2013
+++ new/usr/src/cmd/newtask/newtask.c	Mon Mar 25 12:53:25 2013
@@ -20,12 +20,12 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/task.h>
 
@@ -46,6 +46,12 @@
 #include <signal.h>
 #include <priv_utils.h>
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 #include "utils.h"
 
 #define	OPTIONS_STRING	"Fc:lp:v"
@@ -654,7 +660,7 @@
 static struct passwd *
 match_user(uid_t uid, char *projname, int is_my_uid)
 {
-	char prbuf[PROJECT_BUFSZ], username[LOGNAME_MAX+1];
+	char prbuf[PROJECT_BUFSZ], username[_LOGNAME_MAX+1];
 	struct project prj;
 	char *tmp_name;
 	struct passwd *pw = NULL;
@@ -696,7 +702,8 @@
 	if (projname == NULL || getuid() == (uid_t)0)
 		return (pw);
 
-	(void) strcpy(username, pw->pw_name);
+	(void) strncpy(username, pw->pw_name, sizeof (username) - 1);
+	username[sizeof (username) - 1] = '\0';
 
 	if (inproj(username, projname, prbuf, PROJECT_BUFSZ) == 0) {
 		char **u;
--- old/usr/src/cmd/oamuser/inc/users.h	Mon Mar 25 12:53:25 2013
+++ new/usr/src/cmd/oamuser/inc/users.h	Mon Mar 25 12:53:25 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -45,6 +47,7 @@
 #define	UNIQUE		2	/* is unique */
 #define	TOOBIG		3	/* number too big */
 #define	INVALID		4
+#define	LONGNAME	5	/* string too long */
 
 /*
  * Note: constraints checking for warning (release 2.6),
--- old/usr/src/cmd/oamuser/lib/vlogin.c	Mon Mar 25 12:53:25 2013
+++ new/usr/src/cmd/oamuser/lib/vlogin.c	Mon Mar 25 12:53:25 2013
@@ -20,6 +20,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright (c) 1997, by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -27,9 +29,6 @@
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.3 */
-
 /*LINTLIBRARY*/
 
 #include	<sys/types.h>
@@ -68,12 +67,11 @@
 			clower++;
 	}
 
-	/*
-	 * XXX length checking causes some operational/compatibility problem.
-	 * This has to be revisited in the future as ARC/standards issue.
-	 */
-	if (len > LOGNAME_MAX)
-		*warning = *warning | WARN_NAME_TOO_LONG;
+#ifdef	LOGNAME_MAX_ILLUMOS
+	if (len > LOGNAME_MAX_ILLUMOS)
+		return (LONGNAME);
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 	if (clower == 0)
 		*warning = *warning | WARN_NO_LOWERCHAR;
 	if (badc != 0)
--- old/usr/src/cmd/oamuser/user/messages.c	Mon Mar 25 12:53:25 2013
+++ new/usr/src/cmd/oamuser/user/messages.c	Mon Mar 25 12:53:25 2013
@@ -23,12 +23,12 @@
 
 
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6 */
-
 char *errmsgs[] = {
 	"WARNING: uid %ld is reserved.\n",
 	"WARNING: more than NGROUPS_MAX(%d) groups specified.\n",
@@ -99,6 +99,7 @@
 	"WARNING: gid %ld is reserved.\n",
 	"ERROR: Failed to read /etc/group file due to invalid entry or"
 	    " read error.\n",
+	"ERROR: %s is too long.  Choose another.\n",
 };
 
 int lasterrmsg = sizeof (errmsgs) / sizeof (char *);
--- old/usr/src/cmd/oamuser/user/messages.h	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/oamuser/user/messages.h	Mon Mar 25 12:53:26 2013
@@ -23,6 +23,8 @@
 
 
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -30,8 +32,6 @@
 #ifndef	_MESSAGES_H
 #define	_MESSAGES_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 extern void errmsg(int, ...);
 
 /* WARNING: uid %d is reserved. */
@@ -149,4 +149,7 @@
 /* ERROR: Failed to read /etc/group file due to invalid entry or read error. */
 #define	M_READ_ERROR	37
 
+/* ERROR: %s is too long.  Choose another. */
+#define	M_TOO_LONG	38
+
 #endif /* _MESSAGES_H */
--- old/usr/src/cmd/oamuser/user/useradd.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/oamuser/user/useradd.c	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -393,6 +395,11 @@
 		errmsg(M_USED, logname);
 		exit(EX_NAME_EXISTS);
 		/*NOTREACHED*/
+
+	case LONGNAME:
+		errmsg(M_TOO_LONG, logname);
+		exit(EX_BADARG);
+		/*NOTREACHED*/
 	}
 
 	if (warning)
--- old/usr/src/cmd/oamuser/user/usermod.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/oamuser/user/usermod.c	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -368,6 +370,12 @@
 			errmsg(M_USED, new_logname);
 			exit(EX_NAME_EXISTS);
 			/*NOTREACHED*/
+
+		case LONGNAME:
+			errmsg(M_TOO_LONG, new_logname);
+			exit(EX_BADARG);
+			/*NOTREACHED*/
+
 		default:
 			call_pass = 1;
 			break;
--- old/usr/src/cmd/prstat/prstat.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/prstat/prstat.c	Mon Mar 25 12:53:26 2013
@@ -20,6 +20,8 @@
  */
 
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -59,6 +61,12 @@
 #include "prsort.h"
 #include "prfile.h"
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 /*
  * x86 <sys/regs.h> ERR conflicts with <curses.h> ERR.  For the purposes
  * of this file, we care about the curses.h ERR so include that last.
@@ -75,6 +83,10 @@
 #include <curses.h>
 #include <term.h>
 
+#define	LOGIN_WIDTH	8
+#define	ZONE_WIDTH	28
+#define	PROJECT_WIDTH	28
+
 #define	PSINFO_HEADER_PROC \
 "   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP       "
 #define	PSINFO_HEADER_PROC_LGRP \
@@ -108,8 +120,8 @@
 #define	PSINFO_LINE_LGRP \
 "%6d %-8s %5s %5s %-6s %3s  %3s %9s %3.3s%% %4d %-.16s/%d"
 #define	USAGE_LINE \
-"%6d %-8s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s "\
-"%3.3s %-.12s/%d"
+"%6d %-8s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s %3.3s "\
+"%3.3s %3.3s %-.12s/%d"
 #define	USER_LINE \
 "%6d %-8s %5.5s %5.5s   %3.3s%% %9s %3.3s%%"
 #define	TASK_LINE \
@@ -354,7 +366,7 @@
 	char vcx[4], icx[4], scl[4], sig[4];
 	char psize[6], prssize[6], pmem[6], pcpu[6], ptime[12];
 	char pstate[7], pnice[4], ppri[4];
-	char pname[LOGNAME_MAX+1];
+	char pname[_LOGNAME_MAX+1];
 	char projname[PROJNAME_MAX+1];
 	char zonename[ZONENAME_MAX+1];
 	float cpu, mem;
@@ -446,16 +458,23 @@
 				mem = (100 * id->id_pctmem) / total_mem;
 			else
 				mem = id->id_pctmem;
-			if (list->l_type == LT_USERS)
-				pwd_getname(id->id_uid, pname, LOGNAME_MAX + 1,
-				    opts.o_outpmode & OPT_NORESOLVE);
-			else if (list->l_type == LT_ZONES)
+			if (list->l_type == LT_USERS) {
+				pwd_getname(id->id_uid, pname, sizeof (pname),
+				    opts.o_outpmode & OPT_NORESOLVE,
+				    opts.o_outpmode & OPT_TERMCAP,
+				    LOGIN_WIDTH);
+			} else if (list->l_type == LT_ZONES) {
 				getzonename(id->id_zoneid, zonename,
-				    ZONENAME_MAX);
-			else
+				    sizeof (zonename) - 1,
+				    opts.o_outpmode & OPT_TERMCAP,
+				    ZONE_WIDTH);
+			} else {
 				getprojname(id->id_projid, projname,
-				    PROJNAME_MAX,
-				    opts.o_outpmode & OPT_NORESOLVE);
+				    sizeof (projname) - 1,
+				    opts.o_outpmode & OPT_NORESOLVE,
+				    opts.o_outpmode & OPT_TERMCAP,
+				    PROJECT_WIDTH);
+			}
 			Format_size(psize, id->id_size, 6);
 			Format_size(prssize, id->id_rssize, 6);
 			Format_pct(pmem, mem, 4);
@@ -488,8 +507,10 @@
 			else
 				lwpid = lwp->li_info.pr_nlwp +
 				    lwp->li_info.pr_nzomb;
-			pwd_getname(lwp->li_info.pr_uid, pname, LOGNAME_MAX + 1,
-			    opts.o_outpmode & OPT_NORESOLVE);
+			pwd_getname(lwp->li_info.pr_uid, pname, sizeof (pname),
+			    opts.o_outpmode & OPT_NORESOLVE,
+			    opts.o_outpmode & OPT_TERMCAP,
+			    LOGIN_WIDTH);
 			if (opts.o_outpmode & OPT_PSINFO) {
 				Format_size(psize, lwp->li_info.pr_size, 6);
 				Format_size(prssize, lwp->li_info.pr_rssize, 6);
@@ -522,14 +543,15 @@
 				if (opts.o_outpmode & OPT_LGRP) {
 					(void) printf(PSINFO_LINE_LGRP,
 					    (int)lwp->li_info.pr_pid, pname,
-					    psize, prssize, pstate, ppri, pnice,
-					    ptime, pcpu,
+					    psize, prssize, pstate,
+					    ppri, pnice, ptime, pcpu,
 					    (int)lwp->li_info.pr_lwp.pr_lgrp,
 					    lwp->li_info.pr_fname, lwpid);
 				} else {
 					(void) printf(PSINFO_LINE,
 					    (int)lwp->li_info.pr_pid, pname,
-					    psize, prssize, pstate, ppri, pnice,
+					    psize, prssize,
+					    pstate, ppri, pnice,
 					    ptime, pcpu,
 					    lwp->li_info.pr_fname, lwpid);
 				}
--- old/usr/src/cmd/prstat/prtable.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/prstat/prtable.c	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -59,14 +61,21 @@
 }
 
 void
-pwd_getname(uid_t uid, char *name, int length, int noresolve)
+pwd_getname(uid_t uid, char *name, size_t length, int noresolve,
+    int termcap, size_t width)
 {
 	struct passwd *pwd;
+	size_t n;
 
 	if (noresolve || (pwd = getpwuid(uid)) == NULL) {
 		(void) snprintf(name, length, "%u", uid);
 	} else {
-		(void) snprintf(name, length, "%s", pwd->pw_name);
+		n = strlen(pwd->pw_name);
+		if (termcap && n > width)
+			(void) snprintf(name, length, "%.*s%c",
+			    width - 1, pwd->pw_name, '*');
+		else
+			(void) snprintf(name, length, "%s", pwd->pw_name);
 	}
 }
 
--- old/usr/src/cmd/prstat/prtable.h	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/prstat/prtable.h	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -70,7 +72,7 @@
 	struct plwp	*l_next;
 } plwp_t;
 
-extern void pwd_getname(uid_t, char *, int, int);
+extern void pwd_getname(uid_t, char *, size_t, int, int, size_t);
 extern void add_uid(uidtbl_t *, char *);
 extern int has_uid(uidtbl_t *, uid_t);
 extern void add_element(table_t *, long);
--- old/usr/src/cmd/prstat/prutil.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/prstat/prutil.c	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -278,26 +280,41 @@
 }
 
 void
-getprojname(projid_t projid, char *str, int len, int noresolve)
+getprojname(projid_t projid, char *str, size_t len, int noresolve,
+    int termcap, size_t width)
 {
 	struct project proj;
+	size_t n;
 
 	if (noresolve || getprojbyid(projid, &proj, projbuf, PROJECT_BUFSZ) ==
-	    NULL)
+	    NULL) {
 		(void) snprintf(str, len, "%-6d", (int)projid);
-	else
-		(void) snprintf(str, len, "%-28s", proj.pj_name);
+	} else {
+		n = strlen(proj.pj_name);
+		if (termcap && n > width)
+			(void) snprintf(str, len, "%.*s%c", width - 1,
+			    proj.pj_name, '*');
+		else
+			(void) snprintf(str, len, "%-28s", proj.pj_name);
+	}
 }
 
 void
-getzonename(zoneid_t zoneid, char *str, int len)
+getzonename(zoneid_t zoneid, char *str, size_t len, int termcap, size_t width)
 {
 	char zone_name[ZONENAME_MAX];
+	size_t n;
 
-	if (getzonenamebyid(zoneid, zone_name, sizeof (zone_name)) < 0)
+	if (getzonenamebyid(zoneid, zone_name, sizeof (zone_name)) < 0) {
 		(void) snprintf(str, len, "%-6d", (int)zoneid);
-	else
-		(void) snprintf(str, len, "%-28s", zone_name);
+	} else {
+		n = strlen(zone_name);
+		if (termcap && n > width)
+			(void) snprintf(str, len, "%.*s%c", width - 1,
+			    zone_name, '*');
+		else
+			(void) snprintf(str, len, "%-28s", zone_name);
+	}
 }
 
 /*
--- old/usr/src/cmd/prstat/prutil.h	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/prstat/prutil.h	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -50,8 +52,8 @@
 extern void *Zalloc(size_t);
 extern int Setrlimit();
 extern void Priocntl(char *);
-extern void getprojname(projid_t, char *, int, int);
-extern void getzonename(projid_t, char *, int);
+extern void getprojname(projid_t, char *, size_t, int, int, size_t);
+extern void getzonename(projid_t, char *, size_t, int, size_t);
 extern void stripfname(char *);
 
 #ifdef	__cplusplus
--- old/usr/src/cmd/ps/ps.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/ps/ps.c	Mon Mar 25 12:53:26 2013
@@ -20,6 +20,8 @@
  */
 
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -76,7 +78,12 @@
  */
 #define	ARGSIZ ZONENAME_MAX
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	MAXUGNAME (LOGNAME_MAX_ILLUMOS+2)	/* max chars in a user/group */
+						/* name or printed u/g id */
+#else /* LOGNAME_MAX_ILLUMOS */
 #define	MAXUGNAME 10	/* max chars in a user/group name or printed u/g id */
+#endif /* LOGNAME_MAX_ILLUMOS */
 
 /* Structure for storing user or group info */
 struct ugdata {
--- old/usr/src/cmd/pwck/pwck.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/pwck/pwck.c	Mon Mar 25 12:53:26 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -27,8 +29,6 @@
 /*	  All Rights Reserved  	*/
 
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/signal.h>
@@ -41,7 +41,14 @@
 #include <locale.h>
 #include <errno.h>
 #include <unistd.h>
+#include <limits.h>
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 #define	ERROR1	"Too many/few fields"
 #define	ERROR2	"Bad character(s) in logname"
 #define	ERROR2a "First char in logname not alphabetic"
@@ -163,7 +170,7 @@
 
 		/* Check for valid number of characters in logname */
 
-		if (i <= 0 || i > 8)
+		if (i <= 0 || i > _LOGNAME_MAX)
 			error(ERROR3);
 
 		/* Check that UID is numeric and <= MAXUID */
--- old/usr/src/cmd/zlogin/zlogin.c	Mon Mar 25 12:53:26 2013
+++ new/usr/src/cmd/zlogin/zlogin.c	Mon Mar 25 12:53:27 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -88,6 +90,12 @@
 #include <auth_attr.h>
 #include <secdb.h>
 
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
+
 static int masterfd;
 static struct termios save_termios;
 static struct termios effective_termios;
@@ -1240,7 +1248,7 @@
 	char **new_env;
 	int e, i;
 	char *estr;
-	char varmail[LOGNAME_MAX + 11]; /* strlen(/var/mail/) = 10, NUL */
+	char varmail[_LOGNAME_MAX + 11]; /* strlen(/var/mail/) = 10, NUL */
 	char pwbuf[NSS_BUFLEN_PASSWD + 1];
 	struct passwd pwent;
 	struct passwd *pw = NULL;
--- old/usr/src/head/limits.h	Mon Mar 25 12:53:27 2013
+++ new/usr/src/head/limits.h	Mon Mar 25 12:53:27 2013
@@ -20,6 +20,8 @@
  */
 
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -31,8 +33,6 @@
 #ifndef _LIMITS_H
 #define	_LIMITS_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.34  */
-
 #include <sys/feature_tests.h>
 #include <sys/isa_defs.h>
 #include <iso/limits_iso.h>
@@ -291,6 +291,8 @@
 #endif /* CLK_TCK */
 
 #define	LOGNAME_MAX	8	/* max # of characters in a login name */
+#define	LOGNAME_MAX_ILLUMOS	32	/* max # of characters in an */
+					/* illumos login name */
 #define	TTYNAME_MAX	128	/* max # of characters in a tty name */
 
 #endif	/* if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */
--- old/usr/src/head/nss_dbdefs.h	Mon Mar 25 12:53:27 2013
+++ new/usr/src/head/nss_dbdefs.h	Mon Mar 25 12:53:27 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -188,7 +190,11 @@
 	(NSS_LINELEN_HOSTS + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))
 #define	NSS_BUFLEN_IPNODES	\
 	(NSS_LINELEN_IPNODES + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	NSS_BUFLEN_NETGROUP	(MAXHOSTNAMELEN * 2 + LOGNAME_MAX_ILLUMOS + 3)
+#else /* LOGNAME_MAX_ILLUMOS */
 #define	NSS_BUFLEN_NETGROUP	(MAXHOSTNAMELEN * 2 + LOGNAME_MAX + 3)
+#endif /* LOGNAME_MAX_ILLUMOS */
 #define	NSS_BUFLEN_NETWORKS	NSS_LINELEN_NETWORKS	/* === ?  + 35 * 4 */
 #define	NSS_BUFLEN_PASSWD	NSS_LINELEN_PASSWD
 #define	NSS_BUFLEN_PROJECT	(NSS_LINELEN_PROJECT + 800 * sizeof (char *))
--- old/usr/src/lib/libbsm/common/audit_ftpd.c	Mon Mar 25 12:53:27 2013
+++ new/usr/src/lib/libbsm/common/audit_ftpd.c	Mon Mar 25 12:53:27 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -52,8 +54,14 @@
 #define	NO_ANONYMOUS	(4)
 #define	MISC_FAILURE	(5)
 
-static char		luser[LOGNAME_MAX + 1];
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	_LOGNAME_MAX	LOGNAME_MAX_ILLUMOS
+#else /* LOGNAME_MAX_ILLUMOS */
+#define	_LOGNAME_MAX	LOGNAME_MAX
+#endif /* LOGNAME_MAX_ILLUMOS */
 
+static char		luser[_LOGNAME_MAX + 1];
+
 static void generate_record(char *, int, char *);
 static int selected(uid_t, char *, au_event_t, int);
 
@@ -63,7 +71,7 @@
 	if (cannot_audit(0)) {
 		return;
 	}
-	(void) strncpy(luser, uname, LOGNAME_MAX);
+	(void) strncpy(luser, uname, _LOGNAME_MAX);
 	generate_record(luser, BAD_PASSWD, dgettext(bsm_dom, "bad password"));
 }
 
@@ -74,7 +82,7 @@
 	if (cannot_audit(0)) {
 		return;
 	}
-	(void) strncpy(luser, uname, LOGNAME_MAX);
+	(void) strncpy(luser, uname, _LOGNAME_MAX);
 	generate_record(luser, UNKNOWN_USER, dgettext(bsm_dom, "unknown user"));
 }
 
@@ -85,7 +93,7 @@
 	if (cannot_audit(0)) {
 		return;
 	}
-	(void) strncpy(luser, uname, LOGNAME_MAX);
+	(void) strncpy(luser, uname, _LOGNAME_MAX);
 	generate_record(luser, EXCLUDED_USER, dgettext(bsm_dom,
 	    "excluded user"));
 }
@@ -115,7 +123,7 @@
 	if (cannot_audit(0)) {
 		return;
 	}
-	(void) strncpy(luser, uname, LOGNAME_MAX);
+	(void) strncpy(luser, uname, _LOGNAME_MAX);
 	generate_record(luser, 0, "");
 }
 
--- old/usr/src/lib/nsswitch/ldap/common/getnetgrent.c	Mon Mar 25 12:53:27 2013
+++ new/usr/src/lib/nsswitch/ldap/common/getnetgrent.c	Mon Mar 25 12:53:27 2013
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -35,8 +37,13 @@
 				    ((a).argv[0] == NULL)) ? "*" : (a).argv[0]
 #define	ISNULL(a)		(a == NULL ? "<NULL>" : a)
 #define	MAX_DOMAIN_LEN		1024
+#ifdef	LOGNAME_MAX_ILLUMOS
+#define	MAX_TRIPLE_LEN		(MAXHOSTNAMELEN + LOGNAME_MAX_ILLUMOS + \
+					MAX_DOMAIN_LEN + 5)
+#else /* LOGNAME_MAX_ILLUMOS */
 #define	MAX_TRIPLE_LEN		(MAXHOSTNAMELEN + LOGNAME_MAX + \
 					MAX_DOMAIN_LEN + 5)
+#endif /* LOGNAME_MAX_ILLUMOS */
 
 #define	_F_SETMEMBER		"(&(objectClass=nisNetGroup)(cn=%s))"
 #define	_F_SETMEMBER_SSD	"(&(%%s)(cn=%s))"
--- old/usr/src/man/man1m/prstat.1m	Mon Mar 25 12:53:27 2013
+++ new/usr/src/man/man1m/prstat.1m	Mon Mar 25 12:53:27 2013
@@ -1,4 +1,5 @@
 '\" te
+.\" Copyright (c) 2013 Gary Mills
 .\" Copyright (c) 2006, 2009 Sun Microsystems, Inc. All Rights Reserved.
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
@@ -56,6 +57,7 @@
 .sp .6
 .RS 4n
 Print new reports below previous reports instead of overprinting them.
+Long names are not truncated in this mode.
 .RE
 
 .sp
@@ -128,6 +130,8 @@
 .RS 4n
 Report information about processes and projects. In this mode \fBprstat\fR
 displays separate reports about processes and projects at the same time.
+A trailing asterisk marks a long name that has been truncated
+to fit the column.
 .RE
 
 .sp
@@ -382,6 +386,8 @@
 .RS 4n
 Report information about processes and zones. In this mode, \fBprstat\fR
 displays separate reports about processes and zones at the same time.
+A trailing asterisk marks a long name that has been truncated
+to fit the column.
 .RE
 
 .SH OUTPUT
@@ -407,6 +413,8 @@
 .sp .6
 .RS 4n
 The real user (login) name or real user \fBID\fR.
+A trailing asterisk marks a long name that has been truncated
+to fit the column.
 .RE
 
 .sp
--- old/usr/src/man/man4/passwd.4	Mon Mar 25 12:53:27 2013
+++ new/usr/src/man/man4/passwd.4	Mon Mar 25 12:53:27 2013
@@ -1,4 +1,5 @@
 '\" te
+.\" Copyright (c) 2013 Gary Mills
 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
 .\" Copyright 1989 AT&T
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
@@ -47,7 +48,7 @@
 is the user's login name.
 .sp
 The login (\fBlogin\fR) and role (\fBrole\fR) fields accept a string of no more
-than eight bytes consisting of characters from the set of alphabetic
+than 32 bytes consisting of characters from the set of alphabetic
 characters, numeric characters, period (\fB\&.\fR), underscore (\fB_\fR), and
 hyphen (\fB-\fR). The first character should be alphabetic and the field should
 contain at least one lower case alphabetic character. A warning message is
