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


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*


  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Database-specific definitions for the getXXXbyYYY routines
  26  * (e.g getpwuid_r(), ether_ntohost()) that use the name-service switch.
  27  * Database-independent definitions are in <nss_common.h>
  28  *
  29  * Ideally, this is the only switch header file one would add things
  30  * to in order to support a new database.
  31  *
  32  * NOTE:  The interfaces documented in this file may change in a minor
  33  *        release.  It is intended that in the future a stronger committment
  34  *        will be made to these interface definitions which will guarantee
  35  *        them across minor releases.
  36  */
  37 
  38 #ifndef _NSS_DBDEFS_H
  39 #define _NSS_DBDEFS_H
  40 
  41 #include <sys/types.h>


 171 
 172 #define NSS_LINELEN_TSOL        NSS_BUFSIZ
 173 
 174 #define NSS_LINELEN_TSOL_TP     NSS_LINELEN_TSOL
 175 #define NSS_LINELEN_TSOL_RH     NSS_LINELEN_TSOL
 176 #define NSS_LINELEN_TSOL_ZC     NSS_LINELEN_TSOL
 177 
 178 /*
 179  * Reasonable defaults for 'buflen' values passed to _r functions.  The BSD
 180  * and SunOS 4.x implementations of the getXXXbyYYY() functions used hard-
 181  * coded array sizes;  the values here are meant to handle anything that
 182  * those implementations handled.
 183  * === These might more reasonably go in <pwd.h>, <netdb.h> et al
 184  */
 185 
 186 #define NSS_BUFLEN_GROUP        NSS_LINELEN_GROUP
 187 #define NSS_BUFLEN_HOSTS        \
 188         (NSS_LINELEN_HOSTS + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))
 189 #define NSS_BUFLEN_IPNODES      \
 190         (NSS_LINELEN_IPNODES + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))



 191 #define NSS_BUFLEN_NETGROUP     (MAXHOSTNAMELEN * 2 + LOGNAME_MAX + 3)

 192 #define NSS_BUFLEN_NETWORKS     NSS_LINELEN_NETWORKS    /* === ?  + 35 * 4 */
 193 #define NSS_BUFLEN_PASSWD       NSS_LINELEN_PASSWD
 194 #define NSS_BUFLEN_PROJECT      (NSS_LINELEN_PROJECT + 800 * sizeof (char *))
 195 #define NSS_BUFLEN_PROTOCOLS    NSS_LINELEN_PROTOCOLS   /* === ?  + 35 * 4 */
 196 #define NSS_BUFLEN_PUBLICKEY    NSS_LINELEN_PUBLICKEY
 197 #define NSS_BUFLEN_RPC          NSS_LINELEN_RPC         /* === ?  + 35 * 4 */
 198 #define NSS_BUFLEN_SERVICES     NSS_LINELEN_SERVICES    /* === ?  + 35 * 4 */
 199 #define NSS_BUFLEN_SHADOW       NSS_LINELEN_SHADOW
 200 #define NSS_BUFLEN_ETHERS       NSS_LINELEN_ETHERS
 201 #define NSS_BUFLEN_BOOTPARAMS   NSS_LINELEN_BOOTPARAMS
 202 
 203 #define NSS_BUFLEN_ATTRDB       NSS_LINELEN_ATTRDB
 204 
 205 #define NSS_BUFLEN_AUDITUSER    NSS_BUFLEN_ATTRDB
 206 #define NSS_BUFLEN_AUTHATTR     NSS_BUFLEN_ATTRDB
 207 #define NSS_BUFLEN_EXECATTR     NSS_BUFLEN_ATTRDB
 208 #define NSS_BUFLEN_PROFATTR     NSS_BUFLEN_ATTRDB
 209 #define NSS_BUFLEN_USERATTR     ((NSS_BUFLEN_ATTRDB) * 8)
 210 
 211 #define NSS_BUFLEN_TSOL         NSS_LINELEN_TSOL




   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2013 Gary Mills
  23  *
  24  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  *
  27  * Database-specific definitions for the getXXXbyYYY routines
  28  * (e.g getpwuid_r(), ether_ntohost()) that use the name-service switch.
  29  * Database-independent definitions are in <nss_common.h>
  30  *
  31  * Ideally, this is the only switch header file one would add things
  32  * to in order to support a new database.
  33  *
  34  * NOTE:  The interfaces documented in this file may change in a minor
  35  *        release.  It is intended that in the future a stronger committment
  36  *        will be made to these interface definitions which will guarantee
  37  *        them across minor releases.
  38  */
  39 
  40 #ifndef _NSS_DBDEFS_H
  41 #define _NSS_DBDEFS_H
  42 
  43 #include <sys/types.h>


 173 
 174 #define NSS_LINELEN_TSOL        NSS_BUFSIZ
 175 
 176 #define NSS_LINELEN_TSOL_TP     NSS_LINELEN_TSOL
 177 #define NSS_LINELEN_TSOL_RH     NSS_LINELEN_TSOL
 178 #define NSS_LINELEN_TSOL_ZC     NSS_LINELEN_TSOL
 179 
 180 /*
 181  * Reasonable defaults for 'buflen' values passed to _r functions.  The BSD
 182  * and SunOS 4.x implementations of the getXXXbyYYY() functions used hard-
 183  * coded array sizes;  the values here are meant to handle anything that
 184  * those implementations handled.
 185  * === These might more reasonably go in <pwd.h>, <netdb.h> et al
 186  */
 187 
 188 #define NSS_BUFLEN_GROUP        NSS_LINELEN_GROUP
 189 #define NSS_BUFLEN_HOSTS        \
 190         (NSS_LINELEN_HOSTS + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))
 191 #define NSS_BUFLEN_IPNODES      \
 192         (NSS_LINELEN_IPNODES + (MAXALIASES + MAXADDRS + 2) * sizeof (char *))
 193 #ifdef  LOGNAME_MAX_ILLUMOS
 194 #define NSS_BUFLEN_NETGROUP     (MAXHOSTNAMELEN * 2 + LOGNAME_MAX_ILLUMOS + 3)
 195 #else /* LOGNAME_MAX_ILLUMOS */
 196 #define NSS_BUFLEN_NETGROUP     (MAXHOSTNAMELEN * 2 + LOGNAME_MAX + 3)
 197 #endif /* LOGNAME_MAX_ILLUMOS */
 198 #define NSS_BUFLEN_NETWORKS     NSS_LINELEN_NETWORKS    /* === ?  + 35 * 4 */
 199 #define NSS_BUFLEN_PASSWD       NSS_LINELEN_PASSWD
 200 #define NSS_BUFLEN_PROJECT      (NSS_LINELEN_PROJECT + 800 * sizeof (char *))
 201 #define NSS_BUFLEN_PROTOCOLS    NSS_LINELEN_PROTOCOLS   /* === ?  + 35 * 4 */
 202 #define NSS_BUFLEN_PUBLICKEY    NSS_LINELEN_PUBLICKEY
 203 #define NSS_BUFLEN_RPC          NSS_LINELEN_RPC         /* === ?  + 35 * 4 */
 204 #define NSS_BUFLEN_SERVICES     NSS_LINELEN_SERVICES    /* === ?  + 35 * 4 */
 205 #define NSS_BUFLEN_SHADOW       NSS_LINELEN_SHADOW
 206 #define NSS_BUFLEN_ETHERS       NSS_LINELEN_ETHERS
 207 #define NSS_BUFLEN_BOOTPARAMS   NSS_LINELEN_BOOTPARAMS
 208 
 209 #define NSS_BUFLEN_ATTRDB       NSS_LINELEN_ATTRDB
 210 
 211 #define NSS_BUFLEN_AUDITUSER    NSS_BUFLEN_ATTRDB
 212 #define NSS_BUFLEN_AUTHATTR     NSS_BUFLEN_ATTRDB
 213 #define NSS_BUFLEN_EXECATTR     NSS_BUFLEN_ATTRDB
 214 #define NSS_BUFLEN_PROFATTR     NSS_BUFLEN_ATTRDB
 215 #define NSS_BUFLEN_USERATTR     ((NSS_BUFLEN_ATTRDB) * 8)
 216 
 217 #define NSS_BUFLEN_TSOL         NSS_LINELEN_TSOL