Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/ether.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2009-11-01 15:51:59 +0100
committerArthur de Jong <arthur@arthurdejong.org>2009-11-01 15:51:59 +0100
commitc6aa1fa8ad2eae5e47eb907400c64694c2e67e2f (patch)
tree0a387a04a7f30c6b5901a357757e92a4b0bdf46f /nslcd/ether.c
parent37dfc03f1b54451bda18671bd9d569caa4f85c57 (diff)
give search filter escaping buffers more logical names
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1014 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ether.c')
-rw-r--r--nslcd/ether.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nslcd/ether.c b/nslcd/ether.c
index 3c9c86b..ba26a44 100644
--- a/nslcd/ether.c
+++ b/nslcd/ether.c
@@ -66,23 +66,23 @@ static const char *ether_attrs[3];
static int mkfilter_ether_byname(const char *name,
char *buffer,size_t buflen)
{
- char buf2[1024];
+ char safename[1024];
/* 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))",
ether_filter,
- attmap_ether_cn,buf2);
+ attmap_ether_cn,safename);
}
static int mkfilter_ether_byether(const struct ether_addr *addr,
char *buffer,size_t buflen)
{
- char buf2[20];
+ char ethername[20];
/* transform into string */
- if (ether_ntoa_r(addr,buf2)==NULL)
+ if (ether_ntoa_r(addr,ethername)==NULL)
return -1;
/* FIXME: this has a bug when the directory has 01:00:0e:...
and we're looking for 1:0:e:... (leading zeros) */
@@ -91,7 +91,7 @@ static int mkfilter_ether_byether(const struct ether_addr *addr,
return mysnprintf(buffer,buflen,
"(&%s(%s=%s))",
ether_filter,
- attmap_ether_macAddress,buf2);
+ attmap_ether_macAddress,ethername);
}
void ether_init(void)