diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-12-18 23:53:21 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-12-18 23:55:03 +0100 |
commit | 9f0285333e122c625c6055c3aebebc30f25b8702 (patch) | |
tree | ee5e634896b825d5633a521370f31fd967a5f432 /nslcd/myldap.c | |
parent | 23a41ce888caaea871bf3c20c83136e3f6002f2a (diff) |
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.
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r-- | nslcd/myldap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 235c3c6..620a3b7 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -91,13 +91,13 @@ struct ldap_session { /* a list of searches registered with this session */ struct myldap_search *searches[MAX_SEARCHES_IN_SESSION]; /* the username to bind with */ - char binddn[256]; + char binddn[BUFLEN_DN]; /* the password to bind with if any */ - char bindpw[64]; + char bindpw[BUFLEN_PASSWORD]; /* the authentication result (NSLCD_PAM_* code) */ int policy_response; /* the authentication message */ - char policy_message[1024]; + char policy_message[BUFLEN_MESSAGE]; }; /* A search description set as returned by myldap_search(). */ @@ -155,7 +155,7 @@ int first_search = 1; static void myldap_err(int pri, LDAP *ld, int rc, const char *format, ...) { - char message[200]; + char message[BUFLEN_MESSAGE]; char *msg_ldap = NULL; char *msg_diag = NULL; char *msg_errno = NULL; |