nss-pam-ldapd commit: r1087 - nss-pam-ldapd/nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1087 - nss-pam-ldapd/nslcd
- From: "Commits of the nss-pam-ldapd project." <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1087 - nss-pam-ldapd/nslcd
- Date: Fri, 7 May 2010 23:25:06 +0200 (CEST)
Author: arthur
Date: Fri May 7 23:25:05 2010
New Revision: 1087
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1087
Log:
tune some buffer sizes and small cleanups
Modified:
nss-pam-ldapd/nslcd/alias.c
nss-pam-ldapd/nslcd/ether.c
nss-pam-ldapd/nslcd/group.c
nss-pam-ldapd/nslcd/host.c
nss-pam-ldapd/nslcd/netgroup.c
nss-pam-ldapd/nslcd/network.c
nss-pam-ldapd/nslcd/passwd.c
nss-pam-ldapd/nslcd/protocol.c
nss-pam-ldapd/nslcd/rpc.c
nss-pam-ldapd/nslcd/service.c
nss-pam-ldapd/nslcd/shadow.c
Modified: nss-pam-ldapd/nslcd/alias.c
==============================================================================
--- nss-pam-ldapd/nslcd/alias.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/alias.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -64,7 +64,7 @@
static int mkfilter_alias_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/ether.c
==============================================================================
--- nss-pam-ldapd/nslcd/ether.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/ether.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -66,7 +66,7 @@
static int mkfilter_ether_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if(myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/group.c
==============================================================================
--- nss-pam-ldapd/nslcd/group.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/group.c Fri May 7 23:25:05 2010 (r1087)
@@ -5,7 +5,7 @@
Copyright (C) 1997-2006 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2009 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 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
@@ -80,7 +80,7 @@
static int mkfilter_group_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if(myldap_escape(name,safename,sizeof(safename)))
return -1;
@@ -108,15 +108,14 @@
const char *uid,
char *buffer,size_t buflen)
{
- char buf[80],*dn;
- char safeuid[80];
- char safedn[1024];
+ char dn[256];
+ char safeuid[300];
+ char safedn[300];
/* escape attribute */
if(myldap_escape(uid,safeuid,sizeof(safeuid)))
return -1;
/* try to translate uid to DN */
- dn=uid2dn(session,uid,buf,sizeof(buf));
- if (dn==NULL)
+ if (uid2dn(session,uid,dn,sizeof(dn))==NULL)
return mysnprintf(buffer,buflen,
"(&%s(%s=%s))",
group_filter,
Modified: nss-pam-ldapd/nslcd/host.c
==============================================================================
--- nss-pam-ldapd/nslcd/host.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/host.c Fri May 7 23:25:05 2010 (r1087)
@@ -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 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 @@
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 */
Modified: nss-pam-ldapd/nslcd/netgroup.c
==============================================================================
--- nss-pam-ldapd/nslcd/netgroup.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/netgroup.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -55,7 +55,7 @@
const char *netgroup_filter = "(objectClass=nisNetgroup)";
/* the attributes to request with searches */
-const char *attmap_netgroup_cn = "cn";
+const char *attmap_netgroup_cn = "cn";
const char *attmap_netgroup_nisNetgroupTriple = "nisNetgroupTriple";
const char *attmap_netgroup_memberNisNetgroup = "memberNisNetgroup";
@@ -65,7 +65,7 @@
static int mkfilter_netgroup_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/network.c
==============================================================================
--- nss-pam-ldapd/nslcd/network.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/network.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -80,7 +80,7 @@
static int mkfilter_network_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;
@@ -166,7 +166,7 @@
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 */
Modified: nss-pam-ldapd/nslcd/passwd.c
==============================================================================
--- nss-pam-ldapd/nslcd/passwd.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/passwd.c Fri May 7 23:25:05 2010 (r1087)
@@ -81,7 +81,7 @@
static int mkfilter_passwd_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if(myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/protocol.c
==============================================================================
--- nss-pam-ldapd/nslcd/protocol.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/protocol.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -62,7 +62,7 @@
static int mkfilter_protocol_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/rpc.c
==============================================================================
--- nss-pam-ldapd/nslcd/rpc.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/rpc.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -64,7 +64,7 @@
static int mkfilter_rpc_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
Modified: nss-pam-ldapd/nslcd/service.c
==============================================================================
--- nss-pam-ldapd/nslcd/service.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/service.c Fri May 7 23:25:05 2010 (r1087)
@@ -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
@@ -66,7 +66,7 @@
const char *protocol,
char *buffer,size_t buflen)
{
- char safename[1024],safeprotocol[1024];
+ char safename[300],safeprotocol[300];
/* escape attributes */
if (myldap_escape(name,safename,sizeof(safename)))
return -1;
@@ -92,7 +92,7 @@
const char *protocol,
char *buffer,size_t buflen)
{
- char safeprotocol[1024];
+ char safeprotocol[300];
if (*protocol!='\0')
{
if (myldap_escape(protocol,safeprotocol,sizeof(safeprotocol)))
Modified: nss-pam-ldapd/nslcd/shadow.c
==============================================================================
--- nss-pam-ldapd/nslcd/shadow.c Fri May 7 22:43:23 2010 (r1086)
+++ nss-pam-ldapd/nslcd/shadow.c Fri May 7 23:25:05 2010 (r1087)
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2009 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 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
@@ -72,7 +72,7 @@
static int mkfilter_shadow_byname(const char *name,
char *buffer,size_t buflen)
{
- char safename[1024];
+ char safename[300];
/* escape attribute */
if(myldap_escape(name,safename,sizeof(safename)))
return -1;
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1087 - nss-pam-ldapd/nslcd,
Commits of the nss-pam-ldapd project.