Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/network.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/network.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/network.c')
-rw-r--r--nslcd/network.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nslcd/network.c b/nslcd/network.c
index c3a9149..21ee082 100644
--- a/nslcd/network.c
+++ b/nslcd/network.c
@@ -59,13 +59,13 @@
#endif /* HAVE_USERSEC_H */
/* the attributes to request with searches */
-static const char *attlst[3];
+static const char *network_attlst[3];
-static void attlst_init(void)
+static void network_attlst_init(void)
{
- attlst[0] = attmap_network_cn;
- attlst[1] = attmap_network_ipNetworkNumber;
- attlst[2] = NULL;
+ network_attlst[0]=attmap_network_cn;
+ network_attlst[1]=attmap_network_ipNetworkNumber;
+ network_attlst[2]=NULL;
}
/* write a single network entry to the stream */
@@ -140,8 +140,8 @@ int nslcd_network_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_getnetbyname,LM_NETWORKS,attlst,_nss_ldap_parse_net));
+ network_attlst_init();
+ retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetbyname,LM_NETWORKS,network_attlst,_nss_ldap_parse_net));
/* write the response */
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
@@ -198,8 +198,8 @@ int nslcd_network_byaddr(TFILE *fp)
while (retv==456)
{
/* do the request */
- attlst_init();
- retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetbyaddr,LM_NETWORKS,attlst,_nss_ldap_parse_net));
+ network_attlst_init();
+ retv=nss2nslcd(_nss_ldap_getbyname(&a,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetbyaddr,LM_NETWORKS,network_attlst,_nss_ldap_parse_net));
/* if no entry was found, retry with .0 stripped from the end */
if ((retv==NSLCD_RESULT_NOTFOUND) &&
(strlen(name)>2) &&
@@ -237,8 +237,8 @@ int nslcd_network_all(TFILE *fp)
if (_nss_ldap_ent_context_init(&net_context)==NULL)
return -1;
/* loop over all results */
- attlst_init();
- while ((retv=nss2nslcd(_nss_ldap_getent(&net_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetent,LM_NETWORKS,attlst,_nss_ldap_parse_net)))==NSLCD_RESULT_SUCCESS)
+ network_attlst_init();
+ while ((retv=nss2nslcd(_nss_ldap_getent(&net_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetent,LM_NETWORKS,network_attlst,_nss_ldap_parse_net)))==NSLCD_RESULT_SUCCESS)
{
/* write the result */
WRITE_INT32(fp,retv);