From 458b8e289ad6fb5df0a44c5a119ef9bda8861604 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 7 May 2010 21:25:05 +0000 Subject: 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 --- nslcd/host.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nslcd/host.c') 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 */ -- cgit v1.2.3