Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars
@@ -18,10 +18,12 @@
*
* CDDL HEADER END
*/
/*
+ * Copyright (c) 2013 Gary Mills
+ *
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
@@ -29,12 +31,10 @@
#ifndef _LIMITS_H
#define _LIMITS_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.34 */
-
#include <sys/feature_tests.h>
#include <sys/isa_defs.h>
#include <iso/limits_iso.h>
/*
@@ -288,11 +288,20 @@
extern long _sysconf(int); /* System Private interface to sysconf() */
#define CLK_TCK ((clock_t)_sysconf(3)) /* 3 is _SC_CLK_TCK */
#endif /* CLK_TCK */
+#ifdef __USE_LEGACY_LOGNAME__
#define LOGNAME_MAX 8 /* max # of characters in a login name */
+#else /* __USE_LEGACY_LOGNAME__ */
+#define LOGNAME_MAX 32 /* max # of characters in a login name */
+ /* Increased for illumos */
+#endif /* __USE_LEGACY_LOGNAME__ */
+#define LOGIN_NAME_MAX (LOGNAME_MAX + 1) /* max buffer size */
+#define LOGNAME_MAX_TRAD 8 /* traditional length */
+#define LOGIN_NAME_MAX_TRAD (LOGNAME_MAX_TRAD + 1) /* and size */
+
#define TTYNAME_MAX 128 /* max # of characters in a tty name */
#endif /* if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */
#if defined(__EXTENSIONS__) || (_POSIX_C_SOURCE >= 199506L)