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


   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) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  25  * Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.

  26  */
  27 
  28 /* LINTLIBRARY */
  29 /* PROTOLIB1 */
  30 
  31 #define __EXTENSIONS__
  32 
  33 #include <aio.h>
  34 #include <alloca.h>
  35 #include <attr.h>
  36 #include <atomic.h>
  37 #include <ctype.h>
  38 #include <deflt.h>
  39 #include <dirent.h>
  40 #include <dlfcn.h>
  41 #include <door.h>
  42 #include <err.h>
  43 #include <sys/errno.h>
  44 #include <euc.h>
  45 #include <fcntl.h>


 177 const char *__progname;
 178 
 179 /*
 180  * POSIX versions of standard libc routines; these aren't extracted
 181  * from the headers above since we cannot #define _POSIX_C_SOURCE.
 182  */
 183 int __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
 184     struct dirent ** _RESTRICT_KYWD);
 185 int __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
 186 int __posix_getgrnam_r(const char *, struct group *, char *, size_t,
 187     struct group **);
 188 int __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
 189     struct passwd **);
 190 int __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
 191     struct passwd **);
 192 int __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
 193 char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
 194 char *__posix_ctime_r(const time_t *, char *);
 195 int __posix_ttyname_r(int, char *, size_t);
 196 int __posix_getlogin_r(char *, int);

 197 
 198 /*
 199  * XPG4 versions of standard libc routines; these aren't extracted
 200  * from the headers above since we cannot #define _XPG4_2.
 201  */
 202 int __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
 203 int __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
 204 
 205 /*
 206  * These aren't extracted from the headers above because:
 207  * - We cannot #define _STRPTIME_DONTZERO
 208  * - We cannot #define _XPG5
 209  */
 210 char *__strptime_dontzero(const char *, const char *, struct tm *);
 211 long __sysconf_xpg5(int);
 212 wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
 213         const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
 214 size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
 215         const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
 216 wint_t __fgetwc_xpg5(__FILE *);


 460 const char *getexecname(void);
 461 
 462 /* getgrnam.c */
 463 struct group *getgrnam(const char *name);
 464 struct group *getgrgid(gid_t gid);
 465 struct group *fgetgrent_r(FILE *, struct group *, char *, int);
 466 struct group *getgrent_r(struct group *, char *, int);
 467 struct group *getgrgid_r(gid_t, struct group *, char *, int);
 468 struct group *getgrnam_r(const char *, struct group *, char *, int);
 469 
 470 /* gethostid.c */
 471 long gethostid(void);
 472 
 473 /* gethz.c */
 474 int gethz(void);
 475 
 476 /* getisax.c */
 477 uint_t getisax(uint32_t *, uint_t);
 478 
 479 /* getlogin.c */





 480 char *getlogin(void);



 481 char *getlogin_r(char *, int);
 482 
 483 /* getmntent.c */
 484 int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
 485 int getmntent(FILE *fd, struct mnttab *mp);
 486 
 487 /* getnetgrent.c */
 488 int setnetgrent(const char *grp);
 489 int endnetgrent(void);
 490 int getnetgrent(char **machinep, char **namep, char **domainp);
 491 
 492 /* getopt.c */
 493 int getopt(int argc, char *const *argv, const char *opts);
 494 
 495 /* getopt_long.c */
 496 int getopt_clip(int argc, char *const *argv, const char *optstring,
 497                 const struct option *long_options, int *long_index);
 498 int getopt_long(int argc, char *const *argv, const char *optstring,
 499                 const struct option *long_options, int *long_index);
 500 int getopt_long_only(int argc, char *const *argv, const char *optstring,




   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) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  25  * Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.
  26  * Copyright (c) 2013 Gary Mills
  27  */
  28 
  29 /* LINTLIBRARY */
  30 /* PROTOLIB1 */
  31 
  32 #define __EXTENSIONS__
  33 
  34 #include <aio.h>
  35 #include <alloca.h>
  36 #include <attr.h>
  37 #include <atomic.h>
  38 #include <ctype.h>
  39 #include <deflt.h>
  40 #include <dirent.h>
  41 #include <dlfcn.h>
  42 #include <door.h>
  43 #include <err.h>
  44 #include <sys/errno.h>
  45 #include <euc.h>
  46 #include <fcntl.h>


 178 const char *__progname;
 179 
 180 /*
 181  * POSIX versions of standard libc routines; these aren't extracted
 182  * from the headers above since we cannot #define _POSIX_C_SOURCE.
 183  */
 184 int __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
 185     struct dirent ** _RESTRICT_KYWD);
 186 int __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
 187 int __posix_getgrnam_r(const char *, struct group *, char *, size_t,
 188     struct group **);
 189 int __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
 190     struct passwd **);
 191 int __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
 192     struct passwd **);
 193 int __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
 194 char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
 195 char *__posix_ctime_r(const time_t *, char *);
 196 int __posix_ttyname_r(int, char *, size_t);
 197 int __posix_getlogin_r(char *, int);
 198 int __posix_getloginx_r(char *, int);
 199 
 200 /*
 201  * XPG4 versions of standard libc routines; these aren't extracted
 202  * from the headers above since we cannot #define _XPG4_2.
 203  */
 204 int __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
 205 int __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
 206 
 207 /*
 208  * These aren't extracted from the headers above because:
 209  * - We cannot #define _STRPTIME_DONTZERO
 210  * - We cannot #define _XPG5
 211  */
 212 char *__strptime_dontzero(const char *, const char *, struct tm *);
 213 long __sysconf_xpg5(int);
 214 wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
 215         const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
 216 size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
 217         const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
 218 wint_t __fgetwc_xpg5(__FILE *);


 462 const char *getexecname(void);
 463 
 464 /* getgrnam.c */
 465 struct group *getgrnam(const char *name);
 466 struct group *getgrgid(gid_t gid);
 467 struct group *fgetgrent_r(FILE *, struct group *, char *, int);
 468 struct group *getgrent_r(struct group *, char *, int);
 469 struct group *getgrgid_r(gid_t, struct group *, char *, int);
 470 struct group *getgrnam_r(const char *, struct group *, char *, int);
 471 
 472 /* gethostid.c */
 473 long gethostid(void);
 474 
 475 /* gethz.c */
 476 int gethz(void);
 477 
 478 /* getisax.c */
 479 uint_t getisax(uint32_t *, uint_t);
 480 
 481 /* getlogin.c */
 482 char *getloginx(void);
 483 char *getloginx_r(char *, int);
 484 #ifdef  getlogin
 485 #undef  getlogin
 486 #endif  /* getlogin */
 487 char *getlogin(void);
 488 #ifdef  getlogin_r
 489 #undef  getlogin_r
 490 #endif  /* getlogin_r */
 491 char *getlogin_r(char *, int);
 492 
 493 /* getmntent.c */
 494 int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
 495 int getmntent(FILE *fd, struct mnttab *mp);
 496 
 497 /* getnetgrent.c */
 498 int setnetgrent(const char *grp);
 499 int endnetgrent(void);
 500 int getnetgrent(char **machinep, char **namep, char **domainp);
 501 
 502 /* getopt.c */
 503 int getopt(int argc, char *const *argv, const char *opts);
 504 
 505 /* getopt_long.c */
 506 int getopt_clip(int argc, char *const *argv, const char *optstring,
 507                 const struct option *long_options, int *long_index);
 508 int getopt_long(int argc, char *const *argv, const char *optstring,
 509                 const struct option *long_options, int *long_index);
 510 int getopt_long_only(int argc, char *const *argv, const char *optstring,