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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/oamuser/user/usermod.c
          +++ new/usr/src/cmd/oamuser/user/usermod.c
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright (c) 2013 Gary Mills
       23 + *
  22   24   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
  25   27  
  26   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27   29  /*        All Rights Reserved   */
  28   30  
  29   31  
  30   32  
  31   33  #include <sys/types.h>
↓ open down ↓ 329 lines elided ↑ open up ↑
 361  363                          &warning)) {
 362  364                  case INVALID:
 363  365                          errmsg(M_INVALID, new_logname, "login name");
 364  366                          exit(EX_BADARG);
 365  367                          /*NOTREACHED*/
 366  368  
 367  369                  case NOTUNIQUE:
 368  370                          errmsg(M_USED, new_logname);
 369  371                          exit(EX_NAME_EXISTS);
 370  372                          /*NOTREACHED*/
      373 +
      374 +                case LONGNAME:
      375 +                        errmsg(M_TOO_LONG, new_logname);
      376 +                        exit(EX_BADARG);
      377 +                        /*NOTREACHED*/
      378 +
 371  379                  default:
 372  380                          call_pass = 1;
 373  381                          break;
 374  382                  }
 375  383                  if (warning)
 376  384                          warningmsg(warning, logname);
 377  385          }
 378  386  
 379  387          if (uidstr) {
 380  388                  /* convert uidstr to integer */
↓ open down ↓ 295 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX