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>2007-09-03 23:47:36 +0200
committerArthur de Jong <arthur@arthurdejong.org>2007-09-03 23:47:36 +0200
commitd8026047e2b35abda4c8ef3ba747a0c037d5446d (patch)
tree31d9fdd840897e0dbb499ba75803ef7664c2ac52 /nslcd/ether.c
parent7b7d982ac09aad6d12ef57447aa46d17637039b0 (diff)
include service name in attlst storage and functions
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@373 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ether.c')
-rw-r--r--nslcd/ether.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nslcd/ether.c b/nslcd/ether.c
index 9cc9705..bf17bb9 100644
--- a/nslcd/ether.c
+++ b/nslcd/ether.c
@@ -75,13 +75,13 @@ struct ether
};
/* the attributes to request with searches */
-static const char *attlst[3];
+static const char *ether_attlst[3];
-static void attlst_init(void)
+static void ether_attlst_init(void)
{
- attlst[0] = attmap_ether_cn;
- attlst[1] = attmap_ether_macAddress;
- attlst[2] = NULL;
+ ether_attlst[0]=attmap_ether_cn;
+ ether_attlst[1]=attmap_ether_macAddress;
+ ether_attlst[2]=NULL;
}
static enum nss_status
@@ -137,8 +137,8 @@ int nslcd_ether_byname(TFILE *fp)
LA_INIT(a);
LA_STRING(a)=name;
LA_TYPE(a)=LA_TYPE_STRING;
- attlst_init();
- retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_gethostton,LM_ETHERS,attlst,_nss_ldap_parse_ether));
+ ether_attlst_init();
+ retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_gethostton,LM_ETHERS,ether_attlst,_nss_ldap_parse_ether));
/* write the response */
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
@@ -173,8 +173,8 @@ int nslcd_ether_byether(TFILE *fp)
and we're looking for 1:0:e:... (leading zeros) */
LA_STRING(a)=ether_ntoa(&addr);
LA_TYPE(a)=LA_TYPE_STRING;
- attlst_init();
- retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_getntohost,LM_ETHERS,attlst,_nss_ldap_parse_ether));
+ ether_attlst_init();
+ retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_getntohost,LM_ETHERS,ether_attlst,_nss_ldap_parse_ether));
/* write the response */
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
@@ -204,8 +204,8 @@ int nslcd_ether_all(TFILE *fp)
if (_nss_ldap_ent_context_init(&ether_context)==NULL)
return -1;
/* loop over all results */
- attlst_init();
- while ((retv=nss2nslcd(_nss_ldap_getent(&ether_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,attlst,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS)
+ ether_attlst_init();
+ while ((retv=nss2nslcd(_nss_ldap_getent(&ether_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,ether_attlst,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS)
{
/* write the result */
WRITE_INT32(fp,retv);