summaryrefslogtreecommitdiff
path: root/nss/services.c
diff options
context:
space:
mode:
authorTed Cheng <tedcheng@symas.com>2010-10-09 17:26:31 +0000
committerTed Cheng <tedcheng@symas.com>2010-10-09 17:26:31 +0000
commitbdbeab5693d7c28df3174d5352d5a3ff78b22d92 (patch)
tree68ac871057e64b3a1e494e8ec1bedd0d82a0a843 /nss/services.c
parent611dc583a05914f81c97c165163bcce021b0dfac (diff)
nss-pam-ldapd fixes for solaris 10 build
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1247 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/services.c')
-rw-r--r--nss/services.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/nss/services.c b/nss/services.c
index fb709a4..ff23243 100644
--- a/nss/services.c
+++ b/nss/services.c
@@ -30,6 +30,9 @@
#include "common.h"
#include "compat/attrs.h"
+/* thread-local file pointer to an ongoing request */
+static __thread TFILE *protoentfp;
+
/* read a single services result entry from the stream */
static nss_status_t read_servent(
TFILE *fp,struct servent *result,
@@ -72,12 +75,12 @@ nss_status_t _nss_ldap_getservbyport_r(
}
/* thread-local file pointer to an ongoing request */
-static __thread TFILE *serventfp;
+/* static __thread TFILE *protoentfp; */
/* open request to get all services */
nss_status_t _nss_ldap_setservent(int UNUSED(stayopen))
{
- NSS_SETENT(serventfp);
+ NSS_SETENT(protoentfp);
}
/* read a single returned service definition */
@@ -85,15 +88,15 @@ nss_status_t _nss_ldap_getservent_r(
struct servent *result,
char *buffer,size_t buflen,int *errnop)
{
- NSS_GETENT(serventfp,NSLCD_ACTION_SERVICE_ALL,buffer,buflen,
- read_servent(serventfp,result,buffer,buflen,errnop));
+ NSS_GETENT(protoentfp,NSLCD_ACTION_SERVICE_ALL,buffer,buflen,
+ read_servent(protoentfp,result,buffer,buflen,errnop));
return retv;
}
/* close the stream opened by setservent() above */
nss_status_t _nss_ldap_endservent(void)
{
- NSS_ENDENT(serventfp);
+ NSS_ENDENT(protoentfp);
}
#endif /* NSS_FLAVOUR_GLIBC */
@@ -120,25 +123,22 @@ static nss_status_t _nss_nslcd_getservbyport_r(
return retv;
}
-/* thread-local file pointer to an ongoing request */
-static __thread TFILE *serventfp;
-
static nss_status_t _xnss_ldap_setservent(nss_backend_t UNUSED(*be),void UNUSED(*args))
{
- NSS_SETENT(serventfp);
+ NSS_SETENT(protoentfp);
}
static nss_status_t _nss_nslcd_getservent_r(
struct servent *result,char *buffer,size_t buflen,int *errnop)
{
- NSS_GETENT(serventfp,NSLCD_ACTION_SERVICE_ALL,buffer,buflen,
- read_servent(serventfp,result,buffer,buflen,errnop));
+ NSS_GETENT(protoentfp,NSLCD_ACTION_SERVICE_ALL,buffer,buflen,
+ read_servent(protoentfp,result,buffer,buflen,errnop));
return retv;
}
static nss_status_t _xnss_ldap_endservent(nss_backend_t UNUSED(*be),void UNUSED(*args))
{
- NSS_ENDENT(serventfp);
+ NSS_ENDENT(protoentfp);
}
static nss_status_t _xnss_ldap_getservbyname_r(nss_backend_t UNUSED(*be),void *args)