diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-07 11:28:20 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-07 11:28:20 +0200 |
commit | 916f4afca2d7a655e7179f350d09362a18661bb5 (patch) | |
tree | 510208d208f613d8489d98872106773d81aac046 | |
parent | f32b9a15950fd37aed5dae2ccf0a1e60a0fc78ee (diff) |
rename attlst stuff to attrs since that is the name of the parameter that is passed
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@376 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/alias.c | 18 | ||||
-rw-r--r-- | nslcd/ether.c | 22 | ||||
-rw-r--r-- | nslcd/group.c | 28 | ||||
-rw-r--r-- | nslcd/host.c | 22 | ||||
-rw-r--r-- | nslcd/netgroup.c | 16 | ||||
-rw-r--r-- | nslcd/network.c | 22 | ||||
-rw-r--r-- | nslcd/passwd.c | 36 | ||||
-rw-r--r-- | nslcd/protocol.c | 22 | ||||
-rw-r--r-- | nslcd/rpc.c | 22 | ||||
-rw-r--r-- | nslcd/service.c | 24 | ||||
-rw-r--r-- | nslcd/shadow.c | 32 |
11 files changed, 132 insertions, 132 deletions
diff --git a/nslcd/alias.c b/nslcd/alias.c index eec46ba..b3a6c0d 100644 --- a/nslcd/alias.c +++ b/nslcd/alias.c @@ -46,7 +46,7 @@ #include "ldap-schema.h" /* the attributes to request with searches */ -static const char *alias_attlst[3]; +static const char *alias_attrs[3]; /* create a search filter for searching an alias by name, return -1 on errors */ @@ -74,11 +74,11 @@ static int mkfilter_alias_all(char *buffer,size_t buflen) attmap_objectClass,attmap_alias_objectClass); } -static void alias_attlst_init(void) +static void alias_attrs_init(void) { - alias_attlst[0]=attmap_alias_cn; - alias_attlst[1]=attmap_alias_rfc822MailMember; - alias_attlst[2]=NULL; + alias_attrs[0]=attmap_alias_cn; + alias_attrs[1]=attmap_alias_rfc822MailMember; + alias_attrs[2]=NULL; } static enum nss_status _nss_ldap_parse_alias( @@ -132,8 +132,8 @@ int nslcd_alias_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_ALIAS_BYNAME); /* do the LDAP request */ mkfilter_alias_byname(name,filter,sizeof(filter)); - alias_attlst_init(); - _nss_ldap_searchbyname(NULL,filter,LM_ALIASES,alias_attlst,fp,write_alias); + alias_attrs_init(); + _nss_ldap_searchbyname(NULL,filter,LM_ALIASES,alias_attrs,fp,write_alias); WRITE_FLUSH(fp); /* we're done */ return 0; @@ -157,8 +157,8 @@ int nslcd_alias_all(TFILE *fp) if (_nss_ldap_ent_context_init(&alias_context)==NULL) return -1; /* loop over all results */ - alias_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&alias_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getaliasent,LM_ALIASES,alias_attlst,_nss_ldap_parse_alias)))==NSLCD_RESULT_SUCCESS) + alias_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&alias_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getaliasent,LM_ALIASES,alias_attrs,_nss_ldap_parse_alias)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); diff --git a/nslcd/ether.c b/nslcd/ether.c index 8b0083a..9898880 100644 --- a/nslcd/ether.c +++ b/nslcd/ether.c @@ -74,7 +74,7 @@ struct ether }; /* the attributes to request with searches */ -static const char *ether_attlst[3]; +static const char *ether_attrs[3]; /* create a search filter for searching an ethernet address by name, return -1 on errors */ @@ -117,11 +117,11 @@ static int mkfilter_ether_all(char *buffer,size_t buflen) attmap_objectClass,attmap_ether_objectClass); } -static void ether_attlst_init(void) +static void ether_attrs_init(void) { - ether_attlst[0]=attmap_ether_cn; - ether_attlst[1]=attmap_ether_macAddress; - ether_attlst[2]=NULL; + ether_attrs[0]=attmap_ether_cn; + ether_attrs[1]=attmap_ether_macAddress; + ether_attrs[2]=NULL; } static enum nss_status @@ -175,9 +175,9 @@ int nslcd_ether_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_ETHER_BYNAME); /* do the LDAP request */ mkfilter_ether_byname(name,filter,sizeof(filter)); - ether_attlst_init(); + ether_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_ETHERS, - NULL,filter,ether_attlst,_nss_ldap_parse_ether); + NULL,filter,ether_attrs,_nss_ldap_parse_ether); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -208,9 +208,9 @@ int nslcd_ether_byether(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_ETHER_BYETHER); /* do the LDAP request */ mkfilter_ether_byether(&addr,filter,sizeof(filter)); - ether_attlst_init(); + ether_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_ETHERS, - NULL,filter,ether_attlst,_nss_ldap_parse_ether); + NULL,filter,ether_attrs,_nss_ldap_parse_ether); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -240,8 +240,8 @@ int nslcd_ether_all(TFILE *fp) if (_nss_ldap_ent_context_init(ðer_context)==NULL) return -1; /* loop over all results */ - ether_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(ðer_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,ether_attlst,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS) + ether_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(ðer_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,ether_attrs,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); diff --git a/nslcd/group.c b/nslcd/group.c index 55d9c6e..3f7c2d7 100644 --- a/nslcd/group.c +++ b/nslcd/group.c @@ -113,7 +113,7 @@ static enum nss_status ng_chase(const char *dn,ldap_initgroups_args_t *lia); static enum nss_status ng_chase_backlink(const char **membersOf,ldap_initgroups_args_t *lia); /* the attributes to request with searches */ -static const char *group_attlst[6]; +static const char *group_attrs[6]; /* create a search filter for searching a group entry by name, return -1 on errors */ @@ -192,14 +192,14 @@ static int mkfilter_group_all(char *buffer,size_t buflen) attmap_objectClass,attmap_group_objectClass); } -static void group_attlst_init(void) +static void group_attrs_init(void) { - group_attlst[0]=attmap_group_cn; - group_attlst[1]=attmap_group_userPassword; - group_attlst[2]=attmap_group_memberUid; - group_attlst[3]=attmap_group_uniqueMember; - group_attlst[4]=attmap_group_gidNumber; - group_attlst[5]=NULL; + group_attrs[0]=attmap_group_cn; + group_attrs[1]=attmap_group_userPassword; + group_attrs[2]=attmap_group_memberUid; + group_attrs[3]=attmap_group_uniqueMember; + group_attrs[4]=attmap_group_gidNumber; + group_attrs[5]=NULL; } /* @@ -1196,9 +1196,9 @@ int nslcd_group_byname(TFILE *fp) } /* do the LDAP request */ mkfilter_group_byname(name,filter,sizeof(filter)); - group_attlst_init(); + group_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_GROUP, - NULL,filter,group_attlst,_nss_ldap_parse_gr); + NULL,filter,group_attrs,_nss_ldap_parse_gr); /* write the response */ WRITE_INT32(fp,NSLCD_VERSION); WRITE_INT32(fp,NSLCD_ACTION_GROUP_BYNAME); @@ -1234,9 +1234,9 @@ int nslcd_group_bygid(TFILE *fp) } /* do the LDAP request */ mkfilter_group_bygid(gid,filter,sizeof(filter)); - group_attlst_init(); + group_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_GROUP, - NULL,filter,group_attlst,_nss_ldap_parse_gr); + NULL,filter,group_attrs,_nss_ldap_parse_gr); /* write the response */ WRITE_INT32(fp,NSLCD_VERSION); WRITE_INT32(fp,NSLCD_ACTION_GROUP_BYGID); @@ -1324,8 +1324,8 @@ int nslcd_group_all(TFILE *fp) if (_nss_ldap_ent_context_init(&gr_context)==NULL) return -1; /* loop over all results */ - group_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&gr_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getgrent,LM_GROUP,group_attlst,_nss_ldap_parse_gr)))==NSLCD_RESULT_SUCCESS) + group_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&gr_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getgrent,LM_GROUP,group_attrs,_nss_ldap_parse_gr)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); diff --git a/nslcd/host.c b/nslcd/host.c index 3c9a15c..dc74f02 100644 --- a/nslcd/host.c +++ b/nslcd/host.c @@ -61,7 +61,7 @@ #endif /* the attributes to request with searches */ -static const char *host_attlst[3]; +static const char *host_attrs[3]; /* create a search filter for searching a host entry by name, return -1 on errors */ @@ -100,11 +100,11 @@ static int mkfilter_host_all(char *buffer,size_t buflen) attmap_objectClass,attmap_host_objectClass); } -static void host_attlst_init(void) +static void host_attrs_init(void) { - host_attlst[0]=attmap_host_cn; - host_attlst[1]=attmap_host_ipHostNumber; - host_attlst[2]=NULL; + host_attrs[0]=attmap_host_cn; + host_attrs[1]=attmap_host_ipHostNumber; + host_attrs[2]=NULL; } /* write a single host entry to the stream */ @@ -311,9 +311,9 @@ int nslcd_host_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_HOST_BYNAME); /* do the LDAP request */ mkfilter_host_byname(name,filter,sizeof(filter)); - host_attlst_init(); + host_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_HOSTS, - NULL,filter,host_attlst, + NULL,filter,host_attrs, #ifdef INET6 (af == AF_INET6)?_nss_ldap_parse_hostv6:_nss_ldap_parse_hostv4); #else @@ -368,9 +368,9 @@ int nslcd_host_byaddr(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_HOST_BYADDR); /* do the LDAP request */ mkfilter_host_byaddr(name,filter,sizeof(filter)); - host_attlst_init(); + host_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_HOSTS, - NULL,filter,host_attlst, + NULL,filter,host_attrs, #ifdef INET6 (af == AF_INET6)?_nss_ldap_parse_hostv6:_nss_ldap_parse_hostv4); #else @@ -403,9 +403,9 @@ int nslcd_host_all(TFILE *fp) if (_nss_ldap_ent_context_init(&host_context)==NULL) return -1; /* loop over all results */ - host_attlst_init(); + host_attrs_init(); while ((retv=nss2nslcd(_nss_ldap_getent(&host_context,&result,buffer,1024,&errnop,_nss_ldap_filt_gethostent,LM_HOSTS, - host_attlst, + host_attrs, #ifdef INET6 (_res.options&RES_USE_INET6)?_nss_ldap_parse_hostv6:_nss_ldap_parse_hostv4 #else diff --git a/nslcd/netgroup.c b/nslcd/netgroup.c index 0df3b2b..b829659 100644 --- a/nslcd/netgroup.c +++ b/nslcd/netgroup.c @@ -115,7 +115,7 @@ struct mynetgrent while (0) /* the attributes to request with searches */ -static const char *netgroup_attlst[4]; +static const char *netgroup_attrs[4]; static int mkfilter_netgroup_byname(const char *name, char *buffer,size_t buflen) @@ -131,12 +131,12 @@ static int mkfilter_netgroup_byname(const char *name, attmap_netgroup_cn,buf2); } -static void netgroup_attlst_init(void) +static void netgroup_attrs_init(void) { - netgroup_attlst[0]=attmap_netgroup_cn; - netgroup_attlst[1]=attmap_netgroup_nisNetgroupTriple; - netgroup_attlst[2]=attmap_netgroup_memberNisNetgroup; - netgroup_attlst[3]=NULL; + netgroup_attrs[0]=attmap_netgroup_cn; + netgroup_attrs[1]=attmap_netgroup_nisNetgroupTriple; + netgroup_attrs[2]=attmap_netgroup_memberNisNetgroup; + netgroup_attrs[3]=NULL; } static char * @@ -334,9 +334,9 @@ int nslcd_netgroup_byname(TFILE *fp) result.data_size = 0; /* do initial ldap request */ mkfilter_netgroup_byname(name,filter,sizeof(filter)); - netgroup_attlst_init(); + netgroup_attrs_init(); if (_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_NETGROUP, - NULL,filter,netgroup_attlst,_nss_ldap_load_netgr)) + NULL,filter,netgroup_attrs,_nss_ldap_load_netgr)) return -1; if (_nss_ldap_ent_context_init(&netgroup_context)==NULL) return -1; diff --git a/nslcd/network.c b/nslcd/network.c index bfd3384..2c9e000 100644 --- a/nslcd/network.c +++ b/nslcd/network.c @@ -59,7 +59,7 @@ #endif /* HAVE_USERSEC_H */ /* the attributes to request with searches */ -static const char *network_attlst[3]; +static const char *network_attrs[3]; /* create a search filter for searching a network entry by name, return -1 on errors */ @@ -98,11 +98,11 @@ static int mkfilter_network_all(char *buffer,size_t buflen) attmap_objectClass,attmap_network_objectClass); } -static void network_attlst_init(void) +static void network_attrs_init(void) { - network_attlst[0]=attmap_network_cn; - network_attlst[1]=attmap_network_ipNetworkNumber; - network_attlst[2]=NULL; + network_attrs[0]=attmap_network_cn; + network_attrs[1]=attmap_network_ipNetworkNumber; + network_attrs[2]=NULL; } /* write a single network entry to the stream */ @@ -175,9 +175,9 @@ int nslcd_network_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_NETWORK_BYNAME); /* do the LDAP request */ mkfilter_network_byname(name,filter,sizeof(filter)); - network_attlst_init(); + network_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_NETWORKS, - NULL,filter,network_attlst,_nss_ldap_parse_net); + NULL,filter,network_attrs,_nss_ldap_parse_net); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -231,9 +231,9 @@ int nslcd_network_byaddr(TFILE *fp) { /* do the request */ mkfilter_network_byaddr(name,filter,sizeof(filter)); - network_attlst_init(); + network_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_NETWORKS, - NULL,filter,network_attlst,_nss_ldap_parse_net); + NULL,filter,network_attrs,_nss_ldap_parse_net); /* if no entry was found, retry with .0 stripped from the end */ if ((retv==NSLCD_RESULT_NOTFOUND) && (strlen(name)>2) && @@ -271,8 +271,8 @@ int nslcd_network_all(TFILE *fp) if (_nss_ldap_ent_context_init(&net_context)==NULL) return -1; /* loop over all results */ - 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) + network_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&net_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getnetent,LM_NETWORKS,network_attrs,_nss_ldap_parse_net)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); diff --git a/nslcd/passwd.c b/nslcd/passwd.c index 4d25f0c..d02e881 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -60,7 +60,7 @@ #endif /* the attributes to request with searches */ -static const char *passwd_attlst[10]; +static const char *passwd_attrs[10]; /* create a search filter for searching a passwd entry by name, return -1 on errors */ @@ -98,18 +98,18 @@ static int mkfilter_passwd_all(char *buffer,size_t buflen) attmap_objectClass,attmap_passwd_objectClass); } -static void passwd_attlst_init(void) +static void passwd_attrs_init(void) { - passwd_attlst[0]=attmap_passwd_uid; - passwd_attlst[1]=attmap_passwd_userPassword; - passwd_attlst[2]=attmap_passwd_uidNumber; - passwd_attlst[3]=attmap_passwd_gidNumber; - passwd_attlst[4]=attmap_passwd_cn; - passwd_attlst[5]=attmap_passwd_homeDirectory; - passwd_attlst[6]=attmap_passwd_loginShell; - passwd_attlst[7]=attmap_passwd_gecos; - passwd_attlst[8]=attmap_objectClass; - passwd_attlst[9]=NULL; + passwd_attrs[0]=attmap_passwd_uid; + passwd_attrs[1]=attmap_passwd_userPassword; + passwd_attrs[2]=attmap_passwd_uidNumber; + passwd_attrs[3]=attmap_passwd_gidNumber; + passwd_attrs[4]=attmap_passwd_cn; + passwd_attrs[5]=attmap_passwd_homeDirectory; + passwd_attrs[6]=attmap_passwd_loginShell; + passwd_attrs[7]=attmap_passwd_gecos; + passwd_attrs[8]=attmap_objectClass; + passwd_attrs[9]=NULL; } static inline enum nss_status _nss_ldap_assign_emptystring( @@ -245,9 +245,9 @@ int nslcd_passwd_byname(TFILE *fp) log_log(LOG_DEBUG,"nslcd_passwd_byname(%s)",name); /* do the LDAP request */ mkfilter_passwd_byname(name,filter,sizeof(filter)); - passwd_attlst_init(); + passwd_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_PASSWD, - NULL,filter,passwd_attlst,_nss_ldap_parse_pw); + NULL,filter,passwd_attrs,_nss_ldap_parse_pw); /* write the response */ WRITE_INT32(fp,NSLCD_VERSION); WRITE_INT32(fp,NSLCD_ACTION_PASSWD_BYNAME); @@ -277,9 +277,9 @@ int nslcd_passwd_byuid(TFILE *fp) log_log(LOG_DEBUG,"nslcd_passwd_byuid(%d)",(int)uid); /* do the LDAP request */ mkfilter_passwd_byuid(uid,filter,sizeof(filter)); - passwd_attlst_init(); + passwd_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_PASSWD, - NULL,filter,passwd_attlst,_nss_ldap_parse_pw); + NULL,filter,passwd_attrs,_nss_ldap_parse_pw); /* write the response */ WRITE_INT32(fp,NSLCD_VERSION); WRITE_INT32(fp,NSLCD_ACTION_PASSWD_BYUID); @@ -311,8 +311,8 @@ int nslcd_passwd_all(TFILE *fp) if (_nss_ldap_ent_context_init(&pw_context)==NULL) return -1; /* go over results */ - passwd_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&pw_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getpwent,LM_PASSWD,passwd_attlst,_nss_ldap_parse_pw)))==NSLCD_RESULT_SUCCESS) + passwd_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&pw_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getpwent,LM_PASSWD,passwd_attrs,_nss_ldap_parse_pw)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); diff --git a/nslcd/protocol.c b/nslcd/protocol.c index 29cc50a..d502a08 100644 --- a/nslcd/protocol.c +++ b/nslcd/protocol.c @@ -56,7 +56,7 @@ #include "ldap-schema.h" /* the attributes to request with searches */ -static const char *protocol_attlst[3]; +static const char *protocol_attrs[3]; static int mkfilter_protocol_byname(const char *name, char *buffer,size_t buflen) @@ -92,11 +92,11 @@ static int mkfilter_protocol_all(char *buffer,size_t buflen) attmap_objectClass,attmap_protocol_objectClass); } -static void protocol_attlst_init(void) +static void protocol_attrs_init(void) { - protocol_attlst[0]=attmap_protocol_cn; - protocol_attlst[1]=attmap_protocol_ipProtocolNumber; - protocol_attlst[2]=NULL; + protocol_attrs[0]=attmap_protocol_cn; + protocol_attrs[1]=attmap_protocol_ipProtocolNumber; + protocol_attrs[2]=NULL; } static enum nss_status _nss_ldap_parse_proto (LDAPMessage *e, @@ -158,9 +158,9 @@ int nslcd_protocol_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_PROTOCOL_BYNAME); /* do the LDAP request */ mkfilter_protocol_byname(name,filter,sizeof(filter)); - protocol_attlst_init(); + protocol_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_PROTOCOLS, - NULL,filter,protocol_attlst,_nss_ldap_parse_proto); + NULL,filter,protocol_attrs,_nss_ldap_parse_proto); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -191,9 +191,9 @@ int nslcd_protocol_bynumber(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_PROTOCOL_BYNUMBER); /* do the LDAP request */ mkfilter_protocol_bynumber(protocol,filter,sizeof(filter)); - protocol_attlst_init(); + protocol_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_PROTOCOLS, - NULL,filter,protocol_attlst,_nss_ldap_parse_proto); + NULL,filter,protocol_attrs,_nss_ldap_parse_proto); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -223,8 +223,8 @@ int nslcd_protocol_all(TFILE *fp) if (_nss_ldap_ent_context_init(&protocol_context)==NULL) return -1; /* loop over all results */ - protocol_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&protocol_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getprotoent,LM_PROTOCOLS,protocol_attlst,_nss_ldap_parse_proto)))==NSLCD_RESULT_SUCCESS) + protocol_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&protocol_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getprotoent,LM_PROTOCOLS,protocol_attrs,_nss_ldap_parse_proto)))==NSLCD_RESULT_SUCCESS) { /* write the result code */ WRITE_INT32(fp,retv); diff --git a/nslcd/rpc.c b/nslcd/rpc.c index b91040e..de25b5a 100644 --- a/nslcd/rpc.c +++ b/nslcd/rpc.c @@ -68,7 +68,7 @@ #define RPC_NUMBER result->r_number /* the attributes to request with searches */ -static const char *rpc_attlst[3]; +static const char *rpc_attrs[3]; static int mkfilter_rpc_byname(const char *name, char *buffer,size_t buflen) @@ -101,11 +101,11 @@ static int mkfilter_rpc_all(char *buffer,size_t buflen) attmap_objectClass,attmap_rpc_objectClass); } -static void rpc_attlst_init(void) +static void rpc_attrs_init(void) { - rpc_attlst[0]=attmap_rpc_cn; - rpc_attlst[1]=attmap_rpc_oncRpcNumber; - rpc_attlst[2]=NULL; + rpc_attrs[0]=attmap_rpc_cn; + rpc_attrs[1]=attmap_rpc_oncRpcNumber; + rpc_attrs[2]=NULL; } /* write a single rpc entry to the stream */ @@ -167,9 +167,9 @@ int nslcd_rpc_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_RPC_BYNAME); /* do the LDAP request */ mkfilter_rpc_byname(name,filter,sizeof(filter)); - rpc_attlst_init(); + rpc_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_RPC, - NULL,filter,rpc_attlst,_nss_ldap_parse_rpc); + NULL,filter,rpc_attrs,_nss_ldap_parse_rpc); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -198,9 +198,9 @@ int nslcd_rpc_bynumber(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_RPC_BYNUMBER); /* do the LDAP request */ mkfilter_rpc_bynumber(number,filter,sizeof(filter)); - rpc_attlst_init(); + rpc_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_RPC, - NULL,filter,rpc_attlst,_nss_ldap_parse_rpc); + NULL,filter,rpc_attrs,_nss_ldap_parse_rpc); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -228,8 +228,8 @@ int nslcd_rpc_all(TFILE *fp) if (_nss_ldap_ent_context_init(&rpc_context)==NULL) return -1; /* loop over all results */ - rpc_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&rpc_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getrpcent,LM_RPC,rpc_attlst,_nss_ldap_parse_rpc)))==NSLCD_RESULT_SUCCESS) + rpc_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&rpc_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getrpcent,LM_RPC,rpc_attrs,_nss_ldap_parse_rpc)))==NSLCD_RESULT_SUCCESS) { /* write the result code */ WRITE_INT32(fp,retv); diff --git a/nslcd/service.c b/nslcd/service.c index 54775df..d794ba4 100644 --- a/nslcd/service.c +++ b/nslcd/service.c @@ -69,7 +69,7 @@ #define SERVICE_PROTOCOL result->s_proto /* the attributes to request with searches */ -static const char *service_attlst[4]; +static const char *service_attrs[4]; static int mkfilter_service_byname(const char *name, const char *protocol, @@ -126,12 +126,12 @@ static int mkfilter_service_all(char *buffer,size_t buflen) attmap_objectClass,attmap_service_objectClass); } -static void service_attlst_init(void) +static void service_attrs_init(void) { - service_attlst[0]=attmap_service_cn; - service_attlst[1]=attmap_service_ipServicePort; - service_attlst[2]=attmap_service_ipServiceProtocol; - service_attlst[3]=NULL; + service_attrs[0]=attmap_service_cn; + service_attrs[1]=attmap_service_ipServicePort; + service_attrs[2]=attmap_service_ipServiceProtocol; + service_attrs[3]=NULL; } /* write a single host entry to the stream */ @@ -277,9 +277,9 @@ int nslcd_service_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_SERVICE_BYNAME); /* do the LDAP request */ mkfilter_service_byname(name,protocol,filter,sizeof(filter)); - service_attlst_init(); + service_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_SERVICES, - NULL,filter,service_attlst,_nss_ldap_parse_serv); + NULL,filter,service_attrs,_nss_ldap_parse_serv); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -310,9 +310,9 @@ int nslcd_service_bynumber(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_SERVICE_BYNUMBER); /* do the LDAP request */ mkfilter_service_bynumber(number,protocol,filter,sizeof(filter)); - service_attlst_init(); + service_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_SERVICES, - NULL,filter,service_attlst,_nss_ldap_parse_serv); + NULL,filter,service_attrs,_nss_ldap_parse_serv); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -340,8 +340,8 @@ int nslcd_service_all(TFILE *fp) if (_nss_ldap_ent_context_init(&serv_context)==NULL) return -1; /* loop over all results */ - service_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&serv_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getservent,LM_SERVICES,service_attlst,_nss_ldap_parse_serv)))==NSLCD_RESULT_SUCCESS) + service_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&serv_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getservent,LM_SERVICES,service_attrs,_nss_ldap_parse_serv)))==NSLCD_RESULT_SUCCESS) { /* write the result code */ WRITE_INT32(fp,retv); diff --git a/nslcd/shadow.c b/nslcd/shadow.c index d52bebf..eaafdec 100644 --- a/nslcd/shadow.c +++ b/nslcd/shadow.c @@ -53,7 +53,7 @@ #include "ldap-schema.h" /* the attributes to request with searches */ -static const char *shadow_attlst[10]; +static const char *shadow_attrs[10]; static int mkfilter_shadow_byname(const char *name, char *buffer,size_t buflen) @@ -76,18 +76,18 @@ static int mkfilter_shadow_all(char *buffer,size_t buflen) attmap_objectClass,attmap_shadow_objectClass); } -static void shadow_attlst_init(void) +static void shadow_attrs_init(void) { - shadow_attlst[0]=attmap_shadow_uid; - shadow_attlst[1]=attmap_shadow_userPassword; - shadow_attlst[2]=attmap_shadow_shadowLastChange; - shadow_attlst[3]=attmap_shadow_shadowMax; - shadow_attlst[4]=attmap_shadow_shadowMin; - shadow_attlst[5]=attmap_shadow_shadowWarning; - shadow_attlst[6]=attmap_shadow_shadowInactive; - shadow_attlst[7]=attmap_shadow_shadowExpire; - shadow_attlst[8]=attmap_shadow_shadowFlag; - shadow_attlst[9]=NULL; + shadow_attrs[0]=attmap_shadow_uid; + shadow_attrs[1]=attmap_shadow_userPassword; + shadow_attrs[2]=attmap_shadow_shadowLastChange; + shadow_attrs[3]=attmap_shadow_shadowMax; + shadow_attrs[4]=attmap_shadow_shadowMin; + shadow_attrs[5]=attmap_shadow_shadowWarning; + shadow_attrs[6]=attmap_shadow_shadowInactive; + shadow_attrs[7]=attmap_shadow_shadowExpire; + shadow_attrs[8]=attmap_shadow_shadowFlag; + shadow_attrs[9]=NULL; } static int @@ -211,9 +211,9 @@ int nslcd_shadow_byname(TFILE *fp) WRITE_INT32(fp,NSLCD_ACTION_SHADOW_BYNAME); /* do the LDAP request */ mkfilter_shadow_byname(name,filter,sizeof(filter)); - shadow_attlst_init(); + shadow_attrs_init(); retv=_nss_ldap_getbyname(&result,buffer,1024,&errnop,LM_SHADOW, - NULL,filter,shadow_attlst,_nss_ldap_parse_sp); + NULL,filter,shadow_attrs,_nss_ldap_parse_sp); /* write the response */ WRITE_INT32(fp,retv); if (retv==NSLCD_RESULT_SUCCESS) @@ -243,8 +243,8 @@ int nslcd_shadow_all(TFILE *fp) if (_nss_ldap_ent_context_init(&shadow_context)==NULL) return -1; /* loop over all results */ - shadow_attlst_init(); - while ((retv=nss2nslcd(_nss_ldap_getent(&shadow_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getspent,LM_SHADOW,shadow_attlst,_nss_ldap_parse_sp)))==NSLCD_RESULT_SUCCESS) + shadow_attrs_init(); + while ((retv=nss2nslcd(_nss_ldap_getent(&shadow_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getspent,LM_SHADOW,shadow_attrs,_nss_ldap_parse_sp)))==NSLCD_RESULT_SUCCESS) { /* write the result */ WRITE_INT32(fp,retv); |