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/ps/ps.c
          +++ new/usr/src/cmd/ps/ps.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  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   22  /*
       23 + * Copyright (c) 2013 Gary Mills
       24 + *
  23   25   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  /*
  28   30   * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  29   31   */
  30   32  
  31   33  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  32   34  /*        All Rights Reserved   */
↓ open down ↓ 36 lines elided ↑ open up ↑
  69   71  #define NTTYS   20      /* initial size of table for -t option  */
  70   72  #define SIZ     30      /* initial size of tables for -p, -s, -g, -h and -z */
  71   73  
  72   74  /*
  73   75   * Size of buffer holding args for t, p, s, g, u, U, G, z options.
  74   76   * Set to ZONENAME_MAX, the minimum value needed to allow any
  75   77   * zone to be specified.
  76   78   */
  77   79  #define ARGSIZ ZONENAME_MAX
  78   80  
  79      -#define MAXUGNAME 10    /* max chars in a user/group name or printed u/g id */
       81 +#define MAXUGNAME (LOGNAME_MAX_ILLUMOS+2)       /* max chars in a user/group */
       82 +                                                /* name or printed u/g id */
  80   83  
  81   84  /* Structure for storing user or group info */
  82   85  struct ugdata {
  83   86          id_t    id;                     /* numeric user-id or group-id */
  84   87          char    name[MAXUGNAME+1];      /* user/group name, null terminated */
  85   88  };
  86   89  
  87   90  struct ughead {
  88   91          size_t  size;           /* number of ugdata structs allocated */
  89   92          size_t  nent;           /* number of active entries */
↓ open down ↓ 2306 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX