summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-09-15 11:35:23 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-09-15 11:35:23 +0000
commitd9da865587f2281a1b25021b1e5892cc9195d222 (patch)
tree9f87408516e0faf185426360faa010c284d1ae1b
parent9d234aba05b04ce0a76da271f4e5ab49237f7d8c (diff)
do not pass useless errnos around because they aren't used anymore
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@404 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/alias.c7
-rw-r--r--nslcd/ether.c9
-rw-r--r--nslcd/group.c27
-rw-r--r--nslcd/host.c9
-rw-r--r--nslcd/ldap-nss.c33
-rw-r--r--nslcd/ldap-nss.h3
-rw-r--r--nslcd/netgroup.c3
-rw-r--r--nslcd/network.c10
-rw-r--r--nslcd/passwd.c10
-rw-r--r--nslcd/protocol.c10
-rw-r--r--nslcd/rpc.c10
-rw-r--r--nslcd/service.c10
-rw-r--r--nslcd/shadow.c7
13 files changed, 43 insertions, 105 deletions
diff --git a/nslcd/alias.c b/nslcd/alias.c
index 99b5f98..36c816d 100644
--- a/nslcd/alias.c
+++ b/nslcd/alias.c
@@ -30,7 +30,6 @@
#include <string.h>
#include <lber.h>
#include <ldap.h>
-#include <errno.h>
#include <aliases.h>
#if defined(HAVE_THREAD_H)
#include <thread.h>
@@ -138,7 +137,6 @@ int nslcd_alias_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct aliasent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -150,7 +148,7 @@ int nslcd_alias_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_alias_byname(name,filter,sizeof(filter));
alias_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
alias_base,alias_scope,filter,alias_attrs,
_nss_ldap_parse_alias);
/* write the response */
@@ -169,7 +167,6 @@ int nslcd_alias_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct aliasent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_alias_all()");
@@ -180,7 +177,7 @@ int nslcd_alias_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
alias_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
alias_base,alias_scope,alias_filter,alias_attrs,
_nss_ldap_parse_alias))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/ether.c b/nslcd/ether.c
index eb5bb55..01d19f4 100644
--- a/nslcd/ether.c
+++ b/nslcd/ether.c
@@ -180,7 +180,6 @@ int nslcd_ether_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct ether result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -192,7 +191,7 @@ int nslcd_ether_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_ether_byname(name,filter,sizeof(filter));
ether_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
ether_base,ether_scope,filter,ether_attrs,
_nss_ldap_parse_ether);
/* write the response */
@@ -212,7 +211,6 @@ int nslcd_ether_byether(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct ether result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_TYPE(fp,addr,u_int8_t[6]);
@@ -224,7 +222,7 @@ int nslcd_ether_byether(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_ether_byether(&addr,filter,sizeof(filter));
ether_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
ether_base,ether_scope,filter,ether_attrs,
_nss_ldap_parse_ether);
/* write the response */
@@ -243,7 +241,6 @@ int nslcd_ether_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct ether result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_ether_all()");
@@ -254,7 +251,7 @@ int nslcd_ether_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
ether_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
ether_base,ether_scope,ether_filter,ether_attrs,
_nss_ldap_parse_ether))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/group.c b/nslcd/group.c
index 0dcdef4..5cd1993 100644
--- a/nslcd/group.c
+++ b/nslcd/group.c
@@ -1022,7 +1022,6 @@ static enum nss_status ng_chase(MYLDAP_SESSION *session,const char *dn,ldap_init
enum nss_status stat;
struct ent_context context;
const char *gidnumber_attrs[2];
- int erange;
if (lia->depth>LDAP_NSS_MAXGR_DEPTH)
return NSS_STATUS_NOTFOUND;
@@ -1035,9 +1034,9 @@ static enum nss_status ng_chase(MYLDAP_SESSION *session,const char *dn,ldap_init
_nss_ldap_ent_context_init(&context,session);
mkfilter_getgroupsbydn(dn,filter,sizeof(filter));
- stat=_nss_ldap_getent(&context,lia,NULL,0,&erange,
- group_base,group_scope,filter,gidnumber_attrs,
- do_parse_initgroups_nested);
+ stat=_nss_ldap_getent(&context,lia,NULL,0,
+ group_base,group_scope,filter,gidnumber_attrs,
+ do_parse_initgroups_nested);
if (stat==NSS_STATUS_SUCCESS)
stat=_nss_ldap_namelist_push(&lia->known_groups,dn);
@@ -1055,7 +1054,6 @@ static enum nss_status ng_chase_backlink(MYLDAP_SESSION *session,const char **me
const char **memberP;
const char **filteredMembersOf; /* remove already traversed groups */
size_t memberCount, i;
- int erange;
if (lia->depth > LDAP_NSS_MAXGR_DEPTH)
return NSS_STATUS_NOTFOUND;
@@ -1096,7 +1094,7 @@ static enum nss_status ng_chase_backlink(MYLDAP_SESSION *session,const char **me
_nss_ldap_ent_context_init(&context,session);
/* FIXME: the search filter is wrong here, we should figure out what it's
supposed to be */
- stat=_nss_ldap_getent(&context,lia,NULL,0,&erange,
+ stat=_nss_ldap_getent(&context,lia,NULL,0,
group_base,group_scope,"(distinguishedName=%s)",gidnumber_attrs,
do_parse_initgroups_nested);
@@ -1122,8 +1120,7 @@ static enum nss_status ng_chase_backlink(MYLDAP_SESSION *session,const char **me
return stat;
}
-static int group_bymember(MYLDAP_SESSION *session,const char *user,
- int *errnop)
+static int group_bymember(MYLDAP_SESSION *session,const char *user)
{
ldap_initgroups_args_t lia;
char filter[1024];
@@ -1144,7 +1141,7 @@ static int group_bymember(MYLDAP_SESSION *session,const char *user,
gidnumber_attrs[0] = attmap_group_gidNumber;
gidnumber_attrs[1] = NULL;
_nss_ldap_ent_context_init(&context,session);
- stat=_nss_ldap_getent(&context,(void *)&lia,NULL,0,errnop,
+ stat=_nss_ldap_getent(&context,(void *)&lia,NULL,0,
group_base,group_scope,filter,gidnumber_attrs,
do_parse_initgroups_nested);
_nss_ldap_namelist_destroy(&lia.known_groups);
@@ -1166,7 +1163,6 @@ int nslcd_group_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct group result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -1181,7 +1177,7 @@ int nslcd_group_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_group_byname(name,filter,sizeof(filter));
group_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
group_base,group_scope,filter,group_attrs,
_nss_ldap_parse_gr);
/* write the response */
@@ -1203,7 +1199,6 @@ int nslcd_group_bygid(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct group result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_TYPE(fp,gid,gid_t);
@@ -1218,7 +1213,7 @@ int nslcd_group_bygid(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_group_bygid(gid,filter,sizeof(filter));
group_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
group_base,group_scope,filter,
group_attrs,_nss_ldap_parse_gr);
/* write the response */
@@ -1237,7 +1232,6 @@ int nslcd_group_bymember(TFILE *fp,MYLDAP_SESSION *session)
int32_t tmpint32;
char name[256];
/* these are here for now until we rewrite the LDAP code */
- int errnop;
int retv;
long int start=0,size=1024;
long int i;
@@ -1249,7 +1243,7 @@ int nslcd_group_bymember(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
retv=NSLCD_RESULT_NOTFOUND;
/*
- retv=group_bymember(name,&start,&size,size,&errnop);
+ retv=group_bymember(name,&start,&size,size);
*/
/* Note: we write some garbadge here to ensure protocol error as this
function currently returns incorrect data */
@@ -1294,7 +1288,6 @@ int nslcd_group_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct group result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_group_all()");
@@ -1305,7 +1298,7 @@ int nslcd_group_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
group_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
group_base,group_scope,group_filter,group_attrs,
_nss_ldap_parse_gr))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/host.c b/nslcd/host.c
index 1128963..a253608 100644
--- a/nslcd/host.c
+++ b/nslcd/host.c
@@ -298,7 +298,6 @@ int nslcd_host_byname(TFILE *fp,MYLDAP_SESSION *session)
int retv;
struct hostent result;
char buffer[1024];
- int errnop;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
/* log call */
@@ -309,7 +308,7 @@ int nslcd_host_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_host_byname(name,filter,sizeof(filter));
host_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
host_base,host_scope,filter,host_attrs,
_nss_ldap_parse_host);
/* write the response */
@@ -330,7 +329,6 @@ int nslcd_host_byaddr(TFILE *fp,MYLDAP_SESSION *session)
int retv;
struct hostent result;
char buffer[1024];
- int errnop;
/* read address family */
READ_INT32(fp,af);
if ((af!=AF_INET)&&(af!=AF_INET6))
@@ -361,7 +359,7 @@ int nslcd_host_byaddr(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_host_byaddr(name,filter,sizeof(filter));
host_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
host_base,host_scope,filter,host_attrs,
_nss_ldap_parse_host);
/* write the response */
@@ -379,7 +377,6 @@ int nslcd_host_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct hostent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_host_all()");
@@ -390,7 +387,7 @@ int nslcd_host_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
host_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
host_base,host_scope,host_filter,host_attrs,
_nss_ldap_parse_host))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/ldap-nss.c b/nslcd/ldap-nss.c
index 6f89b78..344e493 100644
--- a/nslcd/ldap-nss.c
+++ b/nslcd/ldap-nss.c
@@ -38,7 +38,6 @@
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/param.h>
-#include <errno.h>
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
@@ -840,22 +839,6 @@ static enum nss_status do_with_reconnect(
return stat;
}
-static void do_map_errno(enum nss_status status, int *errnop)
-{
- switch (status)
- {
- case NSS_STATUS_TRYAGAIN:
- *errnop = ERANGE;
- break;
- case NSS_STATUS_NOTFOUND:
- *errnop = ENOENT;
- break;
- case NSS_STATUS_SUCCESS:
- default:
- *errnop = 0;
- }
-}
-
/*
* Tries parser function "parser" on entries, calling do_result_async()
* to retrieve them from the LDAP server until one parses
@@ -863,7 +846,7 @@ static void do_map_errno(enum nss_status status, int *errnop)
*/
static enum nss_status do_parse_async(
struct ent_context *context,void *result,
- char *buffer,size_t buflen,int *errnop,parser_t parser)
+ char *buffer,size_t buflen,parser_t parser)
{
enum nss_status parseStat=NSS_STATUS_NOTFOUND;
log_log(LOG_DEBUG,"==> do_parse_async");
@@ -918,8 +901,6 @@ static enum nss_status do_parse_async(
}
while (parseStat==NSS_STATUS_NOTFOUND);
- do_map_errno(parseStat,errnop);
-
log_log(LOG_DEBUG,"<== do_parse_async");
return parseStat;
@@ -930,7 +911,7 @@ static enum nss_status do_parse_async(
*/
static enum nss_status do_parse_sync(
struct ent_context *context,void *result,
- char *buffer,size_t buflen,int *errnop,parser_t parser)
+ char *buffer,size_t buflen,parser_t parser)
{
enum nss_status parseStat=NSS_STATUS_NOTFOUND;
LDAPMessage *e=NULL;
@@ -979,8 +960,6 @@ static enum nss_status do_parse_sync(
}
while (parseStat==NSS_STATUS_NOTFOUND);
- do_map_errno(parseStat,errnop);
-
log_log(LOG_DEBUG,"<== do_parse_sync");
return parseStat;
@@ -1138,7 +1117,7 @@ static int nss2nslcd(enum nss_status code)
* enumeration is not completed.
*/
int _nss_ldap_getent(
- struct ent_context *context,void *result,char *buffer,size_t buflen,int *errnop,
+ struct ent_context *context,void *result,char *buffer,size_t buflen,
const char *base,int scope,const char *filter,const char **attrs,
parser_t parser)
{
@@ -1158,7 +1137,7 @@ int _nss_ldap_getent(
while (1)
{
/* parse a result */
- stat=do_parse_async(context,result,buffer,buflen,errnop,parser);
+ stat=do_parse_async(context,result,buffer,buflen,parser);
/* if this had no more results, try the next page */
if ((stat==NSS_STATUS_NOTFOUND)&&(context->ec_cookie!=NULL)&&(context->ec_cookie->bv_len!=0))
{
@@ -1175,7 +1154,7 @@ int _nss_ldap_getent(
/*
* General match function.
*/
-int _nss_ldap_getbyname(MYLDAP_SESSION *session,void *result, char *buffer, size_t buflen,int *errnop,
+int _nss_ldap_getbyname(MYLDAP_SESSION *session,void *result, char *buffer, size_t buflen,
const char *base,int scope,const char *filter,const char **attrs,
parser_t parser)
{
@@ -1201,7 +1180,7 @@ int _nss_ldap_getbyname(MYLDAP_SESSION *session,void *result, char *buffer, size
context.ec_state.ls_type=LS_TYPE_KEY;
context.ec_state.ls_info.ls_key=NULL /*was: args->la_arg2.la_string*/;
- stat=do_parse_sync(&context,result,buffer,buflen,errnop,parser);
+ stat=do_parse_sync(&context,result,buffer,buflen,parser);
_nss_ldap_ent_context_cleanup(&context);
diff --git a/nslcd/ldap-nss.h b/nslcd/ldap-nss.h
index 205436b..a09bf36 100644
--- a/nslcd/ldap-nss.h
+++ b/nslcd/ldap-nss.h
@@ -139,7 +139,6 @@ int _nss_ldap_getent(
void *result, /* IN/OUT */
char *buffer, /* IN */
size_t buflen, /* IN */
- int *errnop, /* OUT */
const char *base, /* IN */
int scope, /* IN */
const char *filter, /* IN */
@@ -150,7 +149,7 @@ int _nss_ldap_getent(
* common lookup routine; uses synchronous API.
*/
int _nss_ldap_getbyname(
- MYLDAP_SESSION *session,void *result, char *buffer, size_t buflen,int *errnop,
+ MYLDAP_SESSION *session,void *result, char *buffer, size_t buflen,
const char *base,int scope,const char *filter,const char **attrs,
parser_t parser);
diff --git a/nslcd/netgroup.c b/nslcd/netgroup.c
index 8c4e33c..d0bb331 100644
--- a/nslcd/netgroup.c
+++ b/nslcd/netgroup.c
@@ -342,7 +342,6 @@ int nslcd_netgroup_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct mynetgrent result;
char buffer[1024];
- int errnop;
enum nss_status stat=NSS_STATUS_SUCCESS;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -357,7 +356,7 @@ int nslcd_netgroup_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do initial ldap request */
mkfilter_netgroup_byname(name,filter,sizeof(filter));
netgroup_init();
- if (_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ if (_nss_ldap_getbyname(session,&result,buffer,1024,
netgroup_base,netgroup_scope,filter,netgroup_attrs,_nss_ldap_load_netgr))
return -1;
/* loop over all results */
diff --git a/nslcd/network.c b/nslcd/network.c
index efe79b2..e6d379f 100644
--- a/nslcd/network.c
+++ b/nslcd/network.c
@@ -33,7 +33,6 @@
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <sys/socket.h>
-#include <errno.h>
#ifdef HAVE_LBER_H
#include <lber.h>
#endif
@@ -176,7 +175,6 @@ int nslcd_network_byname(TFILE *fp,MYLDAP_SESSION *session)
int retv;
struct netent result;
char buffer[1024];
- int errnop;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
/* log call */
@@ -187,7 +185,7 @@ int nslcd_network_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_network_byname(name,filter,sizeof(filter));
network_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
network_base,network_scope,filter,network_attrs,
_nss_ldap_parse_net);
/* write the response */
@@ -208,7 +206,6 @@ int nslcd_network_byaddr(TFILE *fp,MYLDAP_SESSION *session)
int retv=456;
struct netent result;
char buffer[1024];
- int errnop;
/* read address family */
READ_INT32(fp,af);
if (af!=AF_INET)
@@ -243,7 +240,7 @@ int nslcd_network_byaddr(TFILE *fp,MYLDAP_SESSION *session)
/* do the request */
mkfilter_network_byaddr(name,filter,sizeof(filter));
network_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
network_base,network_scope,filter,network_attrs,
_nss_ldap_parse_net);
/* if no entry was found, retry with .0 stripped from the end */
@@ -272,7 +269,6 @@ int nslcd_network_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct netent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_network_all()");
@@ -283,7 +279,7 @@ int nslcd_network_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
network_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
network_base,network_scope,network_filter,network_attrs,
_nss_ldap_parse_net))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/passwd.c b/nslcd/passwd.c
index b1aa900..437ee57 100644
--- a/nslcd/passwd.c
+++ b/nslcd/passwd.c
@@ -30,7 +30,6 @@
#include <sys/param.h>
#include <string.h>
#include <pwd.h>
-#include <errno.h>
#ifdef HAVE_LBER_H
#include <lber.h>
#endif
@@ -270,7 +269,6 @@ int nslcd_passwd_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct passwd result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -279,7 +277,7 @@ int nslcd_passwd_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_passwd_byname(name,filter,sizeof(filter));
passwd_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
passwd_base,passwd_scope,filter,passwd_attrs,
_nss_ldap_parse_pw);
/* write the response */
@@ -301,7 +299,6 @@ int nslcd_passwd_byuid(TFILE *fp,MYLDAP_SESSION *session)
struct passwd result;
char buffer[1024];
char filter[1024];
- int errnop;
int retv;
/* read request parameters */
READ_TYPE(fp,uid,uid_t);
@@ -310,7 +307,7 @@ int nslcd_passwd_byuid(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_passwd_byuid(uid,filter,sizeof(filter));
passwd_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
passwd_base,passwd_scope,filter,passwd_attrs,
_nss_ldap_parse_pw);
/* write the response */
@@ -331,7 +328,6 @@ int nslcd_passwd_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct passwd result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_passwd_all()");
@@ -342,7 +338,7 @@ int nslcd_passwd_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* go over results */
passwd_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
passwd_base,passwd_scope,passwd_filter,passwd_attrs,
_nss_ldap_parse_pw))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/protocol.c b/nslcd/protocol.c
index 9ec24e7..5227998 100644
--- a/nslcd/protocol.c
+++ b/nslcd/protocol.c
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
-#include <errno.h>
#ifdef HAVE_LBER_H
#include <lber.h>
#endif
@@ -164,7 +163,6 @@ int nslcd_protocol_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct protoent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -176,7 +174,7 @@ int nslcd_protocol_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_protocol_byname(name,filter,sizeof(filter));
protocol_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
protocol_base,protocol_scope,filter,protocol_attrs,
_nss_ldap_parse_proto);
/* write the response */
@@ -196,7 +194,6 @@ int nslcd_protocol_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct protoent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_INT32(fp,protocol);
@@ -208,7 +205,7 @@ int nslcd_protocol_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_protocol_bynumber(protocol,filter,sizeof(filter));
protocol_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
protocol_base,protocol_scope,filter,protocol_attrs,
_nss_ldap_parse_proto);
/* write the response */
@@ -227,7 +224,6 @@ int nslcd_protocol_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct protoent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_protocol_all()");
@@ -238,7 +234,7 @@ int nslcd_protocol_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
protocol_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
protocol_base,protocol_scope,protocol_filter,protocol_attrs,
_nss_ldap_parse_proto))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/rpc.c b/nslcd/rpc.c
index c8480ee..8352ad8 100644
--- a/nslcd/rpc.c
+++ b/nslcd/rpc.c
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#ifdef HAVE_RPC_RPCENT_H
#include <rpc/rpcent.h>
#else
@@ -171,7 +170,6 @@ int nslcd_rpc_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct rpcent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -183,7 +181,7 @@ int nslcd_rpc_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_rpc_byname(name,filter,sizeof(filter));
rpc_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
rpc_base,rpc_scope,filter,rpc_attrs,
_nss_ldap_parse_rpc);
/* write the response */
@@ -202,7 +200,6 @@ int nslcd_rpc_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct rpcent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_INT32(fp,number);
@@ -214,7 +211,7 @@ int nslcd_rpc_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_rpc_bynumber(number,filter,sizeof(filter));
rpc_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
rpc_base,rpc_scope,filter,rpc_attrs,
_nss_ldap_parse_rpc);
/* write the response */
@@ -232,7 +229,6 @@ int nslcd_rpc_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct rpcent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_rpc_all()");
@@ -243,7 +239,7 @@ int nslcd_rpc_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
rpc_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
rpc_base,rpc_scope,rpc_filter,rpc_attrs,
_nss_ldap_parse_rpc))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/service.c b/nslcd/service.c
index e6b357d..71fc28d 100644
--- a/nslcd/service.c
+++ b/nslcd/service.c
@@ -36,7 +36,6 @@
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
-#include <errno.h>
#ifdef HAVE_SYS_BYTEORDER_H
#include <sys/byteorder.h>
#endif
@@ -278,7 +277,6 @@ int nslcd_service_byname(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct servent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
@@ -291,7 +289,7 @@ int nslcd_service_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_service_byname(name,protocol,filter,sizeof(filter));
service_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
service_base,service_scope,filter,service_attrs,
_nss_ldap_parse_serv);
/* write the response */
@@ -312,7 +310,6 @@ int nslcd_service_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct servent result;
char buffer[1024];
- int errnop;
int retv;
/* read request parameters */
READ_INT32(fp,number);
@@ -325,7 +322,7 @@ int nslcd_service_bynumber(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_service_bynumber(number,protocol,filter,sizeof(filter));
service_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
service_base,service_scope,filter,service_attrs,
_nss_ldap_parse_serv);
/* write the response */
@@ -344,7 +341,6 @@ int nslcd_service_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct servent result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_service_all()");
@@ -355,7 +351,7 @@ int nslcd_service_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
service_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
service_base,service_scope,service_filter,service_attrs,
_nss_ldap_parse_serv))==NSLCD_RESULT_SUCCESS)
{
diff --git a/nslcd/shadow.c b/nslcd/shadow.c
index 1a9f047..82335a9 100644
--- a/nslcd/shadow.c
+++ b/nslcd/shadow.c
@@ -28,7 +28,6 @@
#include <stdlib.h>
#include <string.h>
#include <shadow.h>
-#include <errno.h>
#ifdef HAVE_PROT_H
#define _PROT_INCLUDED
#endif
@@ -219,7 +218,6 @@ int nslcd_shadow_byname(TFILE *fp,MYLDAP_SESSION *session)
int retv;
struct spwd result;
char buffer[1024];
- int errnop;
/* read request parameters */
READ_STRING_BUF2(fp,name,sizeof(name));
/* log call */
@@ -230,7 +228,7 @@ int nslcd_shadow_byname(TFILE *fp,MYLDAP_SESSION *session)
/* do the LDAP request */
mkfilter_shadow_byname(name,filter,sizeof(filter));
shadow_init();
- retv=_nss_ldap_getbyname(session,&result,buffer,1024,&errnop,
+ retv=_nss_ldap_getbyname(session,&result,buffer,1024,
shadow_base,shadow_scope,filter,shadow_attrs,
_nss_ldap_parse_sp);
/* write the response */
@@ -249,7 +247,6 @@ int nslcd_shadow_all(TFILE *fp,MYLDAP_SESSION *session)
/* these are here for now until we rewrite the LDAP code */
struct spwd result;
char buffer[1024];
- int errnop;
int retv;
/* log call */
log_log(LOG_DEBUG,"nslcd_shadow_all()");
@@ -260,7 +257,7 @@ int nslcd_shadow_all(TFILE *fp,MYLDAP_SESSION *session)
_nss_ldap_ent_context_init(&context,session);
/* loop over all results */
shadow_init();
- while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),&errnop,
+ while ((retv=_nss_ldap_getent(&context,&result,buffer,sizeof(buffer),
shadow_base,shadow_scope,shadow_filter,shadow_attrs,
_nss_ldap_parse_sp))==NSLCD_RESULT_SUCCESS)
{