diff options
Diffstat (limited to 'usr/src/lib/nsswitch/ldap/common/ldap_common.h')
-rw-r--r-- | usr/src/lib/nsswitch/ldap/common/ldap_common.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr/src/lib/nsswitch/ldap/common/ldap_common.h b/usr/src/lib/nsswitch/ldap/common/ldap_common.h index d6e08680c4..7d9b56613a 100644 --- a/usr/src/lib/nsswitch/ldap/common/ldap_common.h +++ b/usr/src/lib/nsswitch/ldap/common/ldap_common.h @@ -19,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _LDAP_COMMON_H #define _LDAP_COMMON_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -88,6 +86,16 @@ extern "C" { buffer += len; \ buflen -= len; +/* + * We need to use UID_NOBODY and GID_NOBODY as strings. Therefore we use + * snprintf to convert [U|G]ID_NOBODY into a string. The target buffer + * size was chosen as 21 to allow the largest 64-bit number to be stored + * as string in it. Right now uid_t and gid_t are 32-bit so we don't + * really need 21 characters but it does allow for future expansion + * without having to modify this code. + */ +#define NOBODY_STR_LEN 21 + /* * Superset the nss_backend_t abstract data type. This ADT has |