Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars

@@ -17,10 +17,12 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2013 Gary Mills
+ *
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */

@@ -366,10 +368,16 @@
 
                 case NOTUNIQUE:
                         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;
                 }
                 if (warning)