summaryrefslogtreecommitdiff
path: root/nslcd/ether.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-09-07 11:10:45 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-09-07 11:10:45 +0000
commit7ded202fd6128c9e4586a63df1bf8a36c8835f11 (patch)
tree4f5160caeb214648aa4cb5b23691dce0127762d9 /nslcd/ether.c
parent916f4afca2d7a655e7179f350d09362a18661bb5 (diff)
also pass search filter for the *_all() functions from the database module instead of doing it in ldap-nss.c
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@377 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ether.c')
-rw-r--r--nslcd/ether.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nslcd/ether.c b/nslcd/ether.c
index 9898880..25ce24a 100644
--- a/nslcd/ether.c
+++ b/nslcd/ether.c
@@ -225,7 +225,8 @@ int nslcd_ether_byether(TFILE *fp)
int nslcd_ether_all(TFILE *fp)
{
int32_t tmpint32;
- static struct ent_context *ether_context;
+ char filter[1024];
+ struct ent_context *ether_context;
/* these are here for now until we rewrite the LDAP code */
struct ether result;
char buffer[1024];
@@ -240,8 +241,10 @@ int nslcd_ether_all(TFILE *fp)
if (_nss_ldap_ent_context_init(&ether_context)==NULL)
return -1;
/* loop over all results */
+ mkfilter_ether_all(filter,sizeof(filter));
ether_attrs_init();
- while ((retv=nss2nslcd(_nss_ldap_getent(&ether_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,ether_attrs,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS)
+ while ((retv=_nss_ldap_getent(&ether_context,&result,buffer,sizeof(buffer),&errnop,
+ NULL,filter,ether_attrs,LM_ETHERS,_nss_ldap_parse_ether))==NSLCD_RESULT_SUCCESS)
{
/* write the result */
WRITE_INT32(fp,retv);