Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/host.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-05-07 23:25:05 +0200
committerArthur de Jong <arthur@arthurdejong.org>2010-05-07 23:25:05 +0200
commit458b8e289ad6fb5df0a44c5a119ef9bda8861604 (patch)
tree06ff0fe76fee3126297d0a6e15036d36dd1321a5 /nslcd/host.c
parentc35d25bb095330e6c5f2510cffbab9170675af32 (diff)
tune some buffer sizes and small cleanups
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1087 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/host.c')
-rw-r--r--nslcd/host.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nslcd/host.c b/nslcd/host.c
index 6a9ddcd..e166889 100644
--- a/nslcd/host.c
+++ b/nslcd/host.c
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2009 Arthur de Jong
+ Copyright (C) 2006, 2007, 2009, 2010 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -67,21 +67,21 @@ static const char *host_attrs[3];
static int mkfilter_host_byname(const char *name,
char *buffer,size_t buflen)
{
- char buf2[1024];
+ char safename[300];
/* escape attribute */
- if (myldap_escape(name,buf2,sizeof(buf2)))
+ if (myldap_escape(name,safename,sizeof(safename)))
return -1;
/* build filter */
return mysnprintf(buffer,buflen,
"(&%s(%s=%s))",
host_filter,
- attmap_host_cn,buf2);
+ attmap_host_cn,safename);
}
static int mkfilter_host_byaddr(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[64];
/* escape attribute */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
@@ -167,7 +167,7 @@ NSLCD_HANDLE(
int af;
char addr[64];
int len=sizeof(addr);
- char name[1024];
+ char name[64];
char filter[1024];
READ_ADDRESS(fp,addr,len,af);
/* translate the address to a string */