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 */

@@ -391,10 +393,15 @@
 
         case NOTUNIQUE:
                 errmsg(M_USED, logname);
                 exit(EX_NAME_EXISTS);
                 /*NOTREACHED*/
+
+        case LONGNAME:
+                errmsg(M_TOO_LONG, logname);
+                exit(EX_BADARG);
+                /*NOTREACHED*/
         }
 
         if (warning)
                 warningmsg(warning, logname);
         if (uidstr != NULL) {