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


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


  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1988 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 /* sysconf(3C) - returns system configuration information */
  31 
  32 #pragma weak _sysconf = sysconf
  33 
  34 #include "lint.h"
  35 #include <mtlib.h>
  36 #include <sys/types.h>
  37 #include <unistd.h>
  38 #include <sys/sysconfig.h>
  39 #include <limits.h>
  40 #include <time.h>
  41 #include <errno.h>
  42 #include <nss_dbdefs.h>


 355                 case _SC_XBS5_ILP32_OFFBIG:
 356                         return (1L);
 357 
 358                 case _SC_XBS5_LP64_OFF64:
 359                         return (1L);
 360 
 361                 case _SC_XBS5_LPBIG_OFFBIG:
 362                         return (1L);
 363 
 364                 /* POSIX.1c names */
 365                 case _SC_THREAD_DESTRUCTOR_ITERATIONS:
 366                         return (-1L);
 367 
 368                 case _SC_GETGR_R_SIZE_MAX:
 369                         return ((long)_nss_get_bufsizes(_SC_GETGR_R_SIZE_MAX));
 370 
 371                 case _SC_GETPW_R_SIZE_MAX:
 372                         return ((long)NSS_BUFLEN_PASSWD);
 373 
 374                 case _SC_LOGIN_NAME_MAX:
 375                         return ((long)(LOGNAME_MAX + 1));
 376 
 377                 case _SC_THREAD_KEYS_MAX:
 378                         return (-1L);
 379 
 380                 case _SC_THREAD_STACK_MIN:
 381                         return ((long)thr_min_stack());
 382 
 383                 case _SC_THREAD_THREADS_MAX:
 384                         return (-1L);
 385 
 386                 case _SC_TTY_NAME_MAX:
 387                         return ((long)TTYNAME_MAX);
 388 
 389                 case _SC_BARRIERS:
 390                         return ((long)_POSIX_BARRIERS);
 391 
 392                 case _SC_CLOCK_SELECTION:
 393                         return ((long)_POSIX_CLOCK_SELECTION);
 394 
 395                 case _SC_MONOTONIC_CLOCK:




   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 /*
  23  * Copyright (c) 2013 Gary Mills
  24  *
  25  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29 /*      Copyright (c) 1988 AT&T     */
  30 /*        All Rights Reserved   */
  31 
  32 /* sysconf(3C) - returns system configuration information */
  33 
  34 #pragma weak _sysconf = sysconf
  35 
  36 #include "lint.h"
  37 #include <mtlib.h>
  38 #include <sys/types.h>
  39 #include <unistd.h>
  40 #include <sys/sysconfig.h>
  41 #include <limits.h>
  42 #include <time.h>
  43 #include <errno.h>
  44 #include <nss_dbdefs.h>


 357                 case _SC_XBS5_ILP32_OFFBIG:
 358                         return (1L);
 359 
 360                 case _SC_XBS5_LP64_OFF64:
 361                         return (1L);
 362 
 363                 case _SC_XBS5_LPBIG_OFFBIG:
 364                         return (1L);
 365 
 366                 /* POSIX.1c names */
 367                 case _SC_THREAD_DESTRUCTOR_ITERATIONS:
 368                         return (-1L);
 369 
 370                 case _SC_GETGR_R_SIZE_MAX:
 371                         return ((long)_nss_get_bufsizes(_SC_GETGR_R_SIZE_MAX));
 372 
 373                 case _SC_GETPW_R_SIZE_MAX:
 374                         return ((long)NSS_BUFLEN_PASSWD);
 375 
 376                 case _SC_LOGIN_NAME_MAX:
 377                         return ((long)(LOGIN_NAME_MAX));
 378 
 379                 case _SC_THREAD_KEYS_MAX:
 380                         return (-1L);
 381 
 382                 case _SC_THREAD_STACK_MIN:
 383                         return ((long)thr_min_stack());
 384 
 385                 case _SC_THREAD_THREADS_MAX:
 386                         return (-1L);
 387 
 388                 case _SC_TTY_NAME_MAX:
 389                         return ((long)TTYNAME_MAX);
 390 
 391                 case _SC_BARRIERS:
 392                         return ((long)_POSIX_BARRIERS);
 393 
 394                 case _SC_CLOCK_SELECTION:
 395                         return ((long)_POSIX_CLOCK_SELECTION);
 396 
 397                 case _SC_MONOTONIC_CLOCK: