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/lib/nsswitch/ldap/common/getnetgrent.c
          +++ new/usr/src/lib/nsswitch/ldap/common/getnetgrent.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 2009 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
  25   27  
  26   28  
  27   29  #include <syslog.h>
  28   30  #include "ldap_common.h"
  29   31  
  30   32  /* netgroup attributes filters */
  31   33  #define _N_TRIPLE               "nisnetgrouptriple"
  32   34  #define _N_MEMBER               "membernisnetgroup"
  33   35  
  34   36  #define PRINT_VAL(a)            (((a).argc == 0) || ((a).argv == NULL) || \
  35   37                                      ((a).argv[0] == NULL)) ? "*" : (a).argv[0]
  36   38  #define ISNULL(a)               (a == NULL ? "<NULL>" : a)
  37   39  #define MAX_DOMAIN_LEN          1024
       40 +#ifdef  LOGNAME_MAX_ILLUMOS
       41 +#define MAX_TRIPLE_LEN          (MAXHOSTNAMELEN + LOGNAME_MAX_ILLUMOS + \
       42 +                                        MAX_DOMAIN_LEN + 5)
       43 +#else /* LOGNAME_MAX_ILLUMOS */
  38   44  #define MAX_TRIPLE_LEN          (MAXHOSTNAMELEN + LOGNAME_MAX + \
  39   45                                          MAX_DOMAIN_LEN + 5)
       46 +#endif /* LOGNAME_MAX_ILLUMOS */
  40   47  
  41   48  #define _F_SETMEMBER            "(&(objectClass=nisNetGroup)(cn=%s))"
  42   49  #define _F_SETMEMBER_SSD        "(&(%%s)(cn=%s))"
  43   50  
  44   51  #define N_HASH          257
  45   52  #define COMMA           ','
  46   53  
  47   54  static const char *netgrent_attrs[] = {
  48   55          _N_TRIPLE,
  49   56          _N_MEMBER,
↓ open down ↓ 983 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX