From 9f0285333e122c625c6055c3aebebc30f25b8702 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Wed, 18 Dec 2013 23:53:21 +0100 Subject: Centralise buffer sizes Common buffer sizes are now stored centrally so it can be easily and consistently updated if required. Some buffers remain with locally defined sizes that do not match a global buffer size. --- nslcd/common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'nslcd/common.h') diff --git a/nslcd/common.h b/nslcd/common.h index 393f695..cfc51eb 100644 --- a/nslcd/common.h +++ b/nslcd/common.h @@ -159,6 +159,17 @@ void invalidator_do(enum ldap_map_selector map); #endif /* _POSIX_HOST_NAME_MAX */ #endif /* not HOST_NAME_MAX */ +/* common buffer lengths */ +#define BUFLEN_NAME 256 /* user, group names and such */ +#define BUFLEN_SAFENAME 300 /* escaped name */ +#define BUFLEN_PASSWORD 64 /* passwords */ +#define BUFLEN_PASSWORDHASH 256 /* passwords hashes */ +#define BUFLEN_DN 256 /* distinguished names */ +#define BUFLEN_SAFEDN 300 /* escapedd dn */ +#define BUFLEN_FILTER 4096 /* search filters */ +#define BUFLEN_HOSTNAME (HOST_NAME_MAX + 1) /* host names (+ escaped) */ +#define BUFLEN_MESSAGE 1024 /* message strings */ + /* provide strtouid() function alias */ #if SIZEOF_UID_T == SIZEOF_UNSIGNED_LONG_INT #define strtouid (uid_t)strtoul -- cgit v1.2.3