summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-10-04 20:27:57 +0000
committerArthur de Jong <arthur@arthurdejong.org>2010-10-04 20:27:57 +0000
commitd5c07d9403bc42f08de10331979a73f2db399b59 (patch)
treed4be106bf36e52c0ff2ee11132f5accbc5cb2180
parent6a2c600499039036b1fa0efcd45747b21308375c (diff)
parent24fae4c5df0c5152891893ab677edb4a9b497d11 (diff)
merge changes from trunk
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1242 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nss/Makefile.am11
-rw-r--r--nss/aliases.c11
-rw-r--r--nss/ethers.c4
-rw-r--r--nss/group.c23
-rw-r--r--nss/hosts.c3
-rw-r--r--nss/netgroup.c10
-rw-r--r--nss/networks.c14
-rw-r--r--nss/passwd.c16
-rw-r--r--nss/protocols.c17
-rw-r--r--nss/rpc.c17
-rw-r--r--nss/services.c10
-rw-r--r--nss/shadow.c12
-rw-r--r--pam/Makefile.am5
13 files changed, 108 insertions, 45 deletions
diff --git a/nss/Makefile.am b/nss/Makefile.am
index 7312a7a..bd89de4 100644
--- a/nss/Makefile.am
+++ b/nss/Makefile.am
@@ -3,6 +3,7 @@
# Copyright (C) 2006 Luke Howard
# Copyright (C) 2006 West Consulting
# Copyright (C) 2006, 2007, 2009, 2010 Arthur de Jong
+# Copyright (C) 2010 Symas Corporation
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -27,14 +28,16 @@ AM_CFLAGS = -fPIC
nss_ldap_so_SOURCES = common.c common.h prototypes.h \
../nslcd.h ../common/nslcd-prot.h \
../compat/attrs.h
+EXTRA_nss_ldap_so_SOURCES = aliases.c ethers.c group.c hosts.c netgroup.c \
+ networks.c passwd.c protocols.c rpc.c services.c \
+ shadow.c
+nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS)
+nss_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a $(NSS_MODULE_OBJS)
+
nss_ldap_so_LDFLAGS = @nss_ldap_so_LDFLAGS@
if HAVE_VERSION_SCRIPT_FLAG
nss_ldap_so_LDFLAGS += $(VERSION_SCRIPT_FLAG)\$(srcdir)/nss_ldap.map
endif
-nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS)
-EXTRA_nss_ldap_so_SOURCES = aliases.c ethers.c group.c hosts.c netgroup.c \
- networks.c passwd.c protocols.c rpc.c services.c \
- shadow.c
if USE_NATIVE_LINKER
nss_ldap_so_LINK = @nss_ldap_so_LD@ @nss_ldap_so_LDFLAGS@ -o $@
diff --git a/nss/aliases.c b/nss/aliases.c
index 4587f72..8c99f91 100644
--- a/nss/aliases.c
+++ b/nss/aliases.c
@@ -2,7 +2,7 @@
aliases.c - NSS lookup functions for aliases database
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,7 @@
#include "prototypes.h"
#include "common.h"
+/* read an alias entry from the stream */
static nss_status_t read_aliasent(
TFILE *fp,struct aliasent *result,
char *buffer,size_t buflen,int *errnop)
@@ -46,6 +47,7 @@ static nss_status_t read_aliasent(
return NSS_STATUS_SUCCESS;
}
+/* get an alias entry by name */
nss_status_t _nss_ldap_getaliasbyname_r(
const char *name,struct aliasent *result,
char *buffer,size_t buflen,int *errnop)
@@ -59,18 +61,23 @@ nss_status_t _nss_ldap_getaliasbyname_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *aliasentfp;
+/* start a request to read all aliases */
nss_status_t _nss_ldap_setaliasent(void)
{
NSS_SETENT(aliasentfp);
}
-nss_status_t _nss_ldap_getaliasent_r(struct aliasent *result,char *buffer,size_t buflen,int *errnop)
+/* read a single alias entry from the stream */
+nss_status_t _nss_ldap_getaliasent_r(
+ struct aliasent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(aliasentfp,NSLCD_ACTION_ALIAS_ALL,buffer,buflen,
read_aliasent(aliasentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened with setaliasent() above */
nss_status_t _nss_ldap_endaliasent(void)
{
NSS_ENDENT(aliasentfp);
diff --git a/nss/ethers.c b/nss/ethers.c
index afe1e3f..72f1d9c 100644
--- a/nss/ethers.c
+++ b/nss/ethers.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read an ethernet entry from the stream */
static nss_status_t read_etherent(
TFILE *fp,struct etherent *result,
char *buffer,size_t buflen,int *errnop)
@@ -68,11 +69,13 @@ nss_status_t _nss_ldap_getntohost_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *etherentfp;
+/* open a connection to read all ether entries */
nss_status_t _nss_ldap_setetherent(int UNUSED(stayopen))
{
NSS_SETENT(etherentfp);
}
+/* read a single ethernet entry from the stream */
nss_status_t _nss_ldap_getetherent_r(
struct etherent *result,
char *buffer,size_t buflen,int *errnop)
@@ -82,6 +85,7 @@ nss_status_t _nss_ldap_getetherent_r(
return retv;
}
+/* close the stream opened with setetherent() above */
nss_status_t _nss_ldap_endetherent(void)
{
NSS_ENDENT(etherentfp);
diff --git a/nss/group.c b/nss/group.c
index be35cb8..e100cf6 100644
--- a/nss/group.c
+++ b/nss/group.c
@@ -31,6 +31,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a single group entry from the stream */
static nss_status_t read_group(
TFILE *fp,struct group *result,
char *buffer,size_t buflen,int *errnop)
@@ -47,8 +48,7 @@ static nss_status_t read_group(
/* read all group entries from the stream and add
gids of these groups to the list */
static nss_status_t read_gids(
- TFILE *fp,gid_t skipgroup,long int *start,
- long int *size,
+ TFILE *fp,gid_t skipgroup,long int *start,long int *size,
gid_t **groupsp,long int limit,int *errnop)
{
int32_t res=(int32_t)NSLCD_RESULT_BEGIN;
@@ -105,9 +105,10 @@ static nss_status_t read_gids(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a group entry by name */
nss_status_t _nss_ldap_getgrnam_r(
- const char *name,struct group *result,char *buffer,
- size_t buflen,int *errnop)
+ const char *name,struct group *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_GROUP_BYNAME,buffer,buflen,
name,
@@ -115,9 +116,10 @@ nss_status_t _nss_ldap_getgrnam_r(
return retv;
}
+/* get a group entry by numeric gid */
nss_status_t _nss_ldap_getgrgid_r(
- gid_t gid,struct group *result,char *buffer,
- size_t buflen,int *errnop)
+ gid_t gid,struct group *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYTYPE(NSLCD_ACTION_GROUP_BYGID,buffer,buflen,
gid,gid_t,
@@ -128,19 +130,23 @@ nss_status_t _nss_ldap_getgrgid_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *grentfp;
+/* start a request to read all groups */
nss_status_t _nss_ldap_setgrent(int UNUSED(stayopen))
{
NSS_SETENT(grentfp);
}
+/* read a single group from the stream */
nss_status_t _nss_ldap_getgrent_r(
- struct group *result,char *buffer,size_t buflen,int *errnop)
+ struct group *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(grentfp,NSLCD_ACTION_GROUP_ALL,buffer,buflen,
read_group(grentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened with setgrent() above */
nss_status_t _nss_ldap_endgrent(void)
{
NSS_ENDENT(grentfp);
@@ -160,8 +166,7 @@ nss_status_t _nss_ldap_endgrent(void)
*/
nss_status_t _nss_ldap_initgroups_dyn(
const char *user,gid_t skipgroup,long int *start,
- long int *size,
- gid_t **groupsp,long int limit,int *errnop)
+ long int *size,gid_t **groupsp,long int limit,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_GROUP_BYMEMBER,groupsp,*size,
user,
diff --git a/nss/hosts.c b/nss/hosts.c
index 79d7579..b07e56e 100644
--- a/nss/hosts.c
+++ b/nss/hosts.c
@@ -33,7 +33,7 @@
#include "common.h"
#include "compat/attrs.h"
-/* Redifine some ERROR_OUT macros as we also want to set h_errnop. */
+/* Redefine some ERROR_OUT macros as we also want to set h_errnop. */
#undef ERROR_OUT_OPENERROR
#define ERROR_OUT_OPENERROR \
@@ -235,6 +235,7 @@ nss_status_t _nss_ldap_gethostent_r(
return retv;
}
+/* close the stream opened with sethostent() above */
nss_status_t _nss_ldap_endhostent(void)
{
NSS_ENDENT(hostentfp);
diff --git a/nss/netgroup.c b/nss/netgroup.c
index 0e41da0..d536b12 100644
--- a/nss/netgroup.c
+++ b/nss/netgroup.c
@@ -92,7 +92,9 @@ static nss_status_t read_netgrent(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *netgrentfp;
-nss_status_t _nss_ldap_setnetgrent(const char *group,struct __netgrent UNUSED(* result))
+/* start a request to get a netgroup by name */
+nss_status_t _nss_ldap_setnetgrent(
+ const char *group,struct __netgrent UNUSED(*result))
{
/* we cannot use NSS_SETENT() here because we have a parameter that is only
available in this function */
@@ -110,13 +112,17 @@ nss_status_t _nss_ldap_setnetgrent(const char *group,struct __netgrent UNUSED(*
return NSS_STATUS_SUCCESS;
}
-nss_status_t _nss_ldap_getnetgrent_r(struct __netgrent *result,char *buffer,size_t buflen,int *errnop)
+/* get a single netgroup tuple from the stream */
+nss_status_t _nss_ldap_getnetgrent_r(
+ struct __netgrent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(netgrentfp,NSLCD_ACTION_NETGROUP_BYNAME,buffer,buflen,
read_netgrent(netgrentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened with setnetgrent() above */
nss_status_t _nss_ldap_endnetgrent(struct __netgrent UNUSED(* result))
{
NSS_ENDENT(netgrentfp);
diff --git a/nss/networks.c b/nss/networks.c
index 13b9e7c..923f562 100644
--- a/nss/networks.c
+++ b/nss/networks.c
@@ -33,7 +33,7 @@
#include "common.h"
#include "compat/attrs.h"
-/* Redifine some ERROR_OUT macros as we also want to set h_errnop. */
+/* Redefine some ERROR_OUT macros as we also want to set h_errnop. */
#undef ERROR_OUT_OPENERROR
#define ERROR_OUT_OPENERROR \
@@ -113,9 +113,10 @@ static nss_status_t read_netent(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a network entry by name */
nss_status_t _nss_ldap_getnetbyname_r(
- const char *name,struct netent *result,char *buffer,
- size_t buflen,int *errnop,int *h_errnop)
+ const char *name,struct netent *result,
+ char *buffer,size_t buflen,int *errnop,int *h_errnop)
{
NSS_BYNAME(NSLCD_ACTION_NETWORK_BYNAME,buffer,buflen,
name,
@@ -138,20 +139,23 @@ nss_status_t _nss_ldap_getnetbyaddr_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *netentfp;
+/* start a request to read all networks */
nss_status_t _nss_ldap_setnetent(int UNUSED(stayopen))
{
NSS_SETENT(netentfp);
}
+/* get a single network entry from the stream */
nss_status_t _nss_ldap_getnetent_r(
- struct netent *result,char *buffer,size_t buflen,
- int *errnop,int *h_errnop)
+ struct netent *result,
+ char *buffer,size_t buflen,int *errnop,int *h_errnop)
{
NSS_GETENT(netentfp,NSLCD_ACTION_NETWORK_ALL,buffer,buflen,
read_netent(netentfp,result,buffer,buflen,errnop,h_errnop));
return retv;
}
+/* close the stream opened by setnetent() above */
nss_status_t _nss_ldap_endnetent(void)
{
NSS_ENDENT(netentfp);
diff --git a/nss/passwd.c b/nss/passwd.c
index 2be7a25..ec8d1c2 100644
--- a/nss/passwd.c
+++ b/nss/passwd.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a passwd entry from the stream */
static nss_status_t read_passwd(
TFILE *fp,struct passwd *result,
char *buffer,size_t buflen,int *errnop)
@@ -48,9 +49,10 @@ static nss_status_t read_passwd(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a single passwd entry by name */
nss_status_t _nss_ldap_getpwnam_r(
- const char *name,struct passwd *result,char *buffer,size_t buflen,
- int *errnop)
+ const char *name,struct passwd *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_PASSWD_BYNAME,buffer,buflen,
name,
@@ -58,9 +60,10 @@ nss_status_t _nss_ldap_getpwnam_r(
return retv;
}
+/* get a single passwd entry by uid */
nss_status_t _nss_ldap_getpwuid_r(
- uid_t uid,struct passwd *result,char *buffer,
- size_t buflen,int *errnop)
+ uid_t uid,struct passwd *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYTYPE(NSLCD_ACTION_PASSWD_BYUID,buffer,buflen,
uid,uid_t,
@@ -71,7 +74,7 @@ nss_status_t _nss_ldap_getpwuid_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *pwentfp;
-/* open a connection to the nslcd and write the request */
+/* open a connection to read all passwd entries */
nss_status_t _nss_ldap_setpwent(int UNUSED(stayopen))
{
NSS_SETENT(pwentfp);
@@ -79,7 +82,8 @@ nss_status_t _nss_ldap_setpwent(int UNUSED(stayopen))
/* read password data from an opened stream */
nss_status_t _nss_ldap_getpwent_r(
- struct passwd *result,char *buffer,size_t buflen,int *errnop)
+ struct passwd *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(pwentfp,NSLCD_ACTION_PASSWD_ALL,buffer,buflen,
read_passwd(pwentfp,result,buffer,buflen,errnop));
diff --git a/nss/protocols.c b/nss/protocols.c
index ded7b17..0ead9a3 100644
--- a/nss/protocols.c
+++ b/nss/protocols.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a single protocol entry from the stream */
static nss_status_t read_protoent(
TFILE *fp,struct protoent *result,
char *buffer,size_t buflen,int *errnop)
@@ -44,9 +45,10 @@ static nss_status_t read_protoent(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a protocol entry by name */
nss_status_t _nss_ldap_getprotobyname_r(
- const char *name,struct protoent *result,char *buffer,
- size_t buflen,int *errnop)
+ const char *name,struct protoent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_PROTOCOL_BYNAME,buffer,buflen,
name,
@@ -54,9 +56,10 @@ nss_status_t _nss_ldap_getprotobyname_r(
return retv;
}
+/* get a protocol entry by number */
nss_status_t _nss_ldap_getprotobynumber_r(
- int number,struct protoent *result,char *buffer,
- size_t buflen,int *errnop)
+ int number,struct protoent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYINT32(NSLCD_ACTION_PROTOCOL_BYNUMBER,buffer,buflen,
number,
@@ -67,19 +70,23 @@ nss_status_t _nss_ldap_getprotobynumber_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *protoentfp;
+/* start a request to read all protocol entries */
nss_status_t _nss_ldap_setprotoent(int UNUSED(stayopen))
{
NSS_SETENT(protoentfp);
}
+/* get a single protocol entry */
nss_status_t _nss_ldap_getprotoent_r(
- struct protoent *result,char *buffer,size_t buflen,int *errnop)
+ struct protoent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(protoentfp,NSLCD_ACTION_PROTOCOL_ALL,buffer,buflen,
read_protoent(protoentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened by setprotoent() above */
nss_status_t _nss_ldap_endprotoent(void)
{
NSS_ENDENT(protoentfp);
diff --git a/nss/rpc.c b/nss/rpc.c
index 374ec12..6a33758 100644
--- a/nss/rpc.c
+++ b/nss/rpc.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a sinlge rpc entry from the stream */
static nss_status_t read_rpcent(
TFILE *fp,struct rpcent *result,
char *buffer,size_t buflen,int *errnop)
@@ -44,9 +45,10 @@ static nss_status_t read_rpcent(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a rpc entry by name */
nss_status_t _nss_ldap_getrpcbyname_r(
- const char *name,struct rpcent *result,char *buffer,
- size_t buflen,int *errnop)
+ const char *name,struct rpcent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_RPC_BYNAME,buffer,buflen,
name,
@@ -54,9 +56,10 @@ nss_status_t _nss_ldap_getrpcbyname_r(
return retv;
}
+/* get a rpc entry by number */
nss_status_t _nss_ldap_getrpcbynumber_r(
- int number,struct rpcent *result,char *buffer,
- size_t buflen,int *errnop)
+ int number,struct rpcent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYINT32(NSLCD_ACTION_RPC_BYNUMBER,buffer,buflen,
number,
@@ -67,19 +70,23 @@ nss_status_t _nss_ldap_getrpcbynumber_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *protoentfp;
+/* request a stream to list all rpc entries */
nss_status_t _nss_ldap_setrpcent(int UNUSED(stayopen))
{
NSS_SETENT(protoentfp);
}
+/* get an rpc entry from the list */
nss_status_t _nss_ldap_getrpcent_r(
- struct rpcent *result,char *buffer,size_t buflen,int *errnop)
+ struct rpcent *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(protoentfp,NSLCD_ACTION_RPC_ALL,buffer,buflen,
read_rpcent(protoentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened by setrpcent() above */
nss_status_t _nss_ldap_endrpcent(void)
{
NSS_ENDENT(protoentfp);
diff --git a/nss/services.c b/nss/services.c
index 87a7c2f..61e978a 100644
--- a/nss/services.c
+++ b/nss/services.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a single services result entry from the stream */
static nss_status_t read_servent(
TFILE *fp,struct servent *result,
char *buffer,size_t buflen,int *errnop)
@@ -38,6 +39,7 @@ static nss_status_t read_servent(
size_t bufptr=0;
READ_BUF_STRING(fp,result->s_name);
READ_BUF_STRINGLIST(fp,result->s_aliases);
+ /* store port number in network byte order */
READ_TYPE(fp,tmpint32,int32_t);
result->s_port=htons((uint16_t)tmpint32);
READ_BUF_STRING(fp,result->s_proto);
@@ -47,6 +49,7 @@ static nss_status_t read_servent(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a service entry by name and protocol */
nss_status_t _nss_ldap_getservbyname_r(
const char *name,const char *protocol,struct servent *result,
char *buffer,size_t buflen,int *errnop)
@@ -57,6 +60,7 @@ nss_status_t _nss_ldap_getservbyname_r(
return retv;
}
+/* get a service entry by port and protocol */
nss_status_t _nss_ldap_getservbyport_r(
int port,const char *protocol,struct servent *result,
char *buffer,size_t buflen,int *errnop)
@@ -70,19 +74,23 @@ nss_status_t _nss_ldap_getservbyport_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *protoentfp;
+/* open request to get all services */
nss_status_t _nss_ldap_setservent(int UNUSED(stayopen))
{
NSS_SETENT(protoentfp);
}
+/* read a single returned service definition */
nss_status_t _nss_ldap_getservent_r(
- struct servent *result,char *buffer,size_t buflen,int *errnop)
+ struct servent *result,
+ char *buffer,size_t buflen,int *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(protoentfp);
diff --git a/nss/shadow.c b/nss/shadow.c
index e7ec530..935d792 100644
--- a/nss/shadow.c
+++ b/nss/shadow.c
@@ -30,6 +30,7 @@
#include "common.h"
#include "compat/attrs.h"
+/* read a single shadow entry from the stream */
static nss_status_t read_spwd(
TFILE *fp,struct spwd *result,
char *buffer,size_t buflen,int *errnop)
@@ -50,9 +51,10 @@ static nss_status_t read_spwd(
#ifdef NSS_FLAVOUR_GLIBC
+/* get a shadow entry by name */
nss_status_t _nss_ldap_getspnam_r(
- const char *name,struct spwd *result,char *buffer,
- size_t buflen,int *errnop)
+ const char *name,struct spwd *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_BYNAME(NSLCD_ACTION_SHADOW_BYNAME,buffer,buflen,
name,
@@ -63,19 +65,23 @@ nss_status_t _nss_ldap_getspnam_r(
/* thread-local file pointer to an ongoing request */
static __thread TFILE *spentfp;
+/* start listing all shadow users */
nss_status_t _nss_ldap_setspent(int UNUSED(stayopen))
{
NSS_SETENT(spentfp);
}
+/* return a single shadow entry read from the stream */
nss_status_t _nss_ldap_getspent_r(
- struct spwd *result,char *buffer,size_t buflen,int *errnop)
+ struct spwd *result,
+ char *buffer,size_t buflen,int *errnop)
{
NSS_GETENT(spentfp,NSLCD_ACTION_SHADOW_ALL,buffer,buflen,
read_spwd(spentfp,result,buffer,buflen,errnop));
return retv;
}
+/* close the stream opened by setspent() above */
nss_status_t _nss_ldap_endspent(void)
{
NSS_ENDENT(spentfp);
diff --git a/pam/Makefile.am b/pam/Makefile.am
index 5e7efed..e6674fe 100644
--- a/pam/Makefile.am
+++ b/pam/Makefile.am
@@ -1,6 +1,7 @@
# Makefile.am - use automake to generate Makefile.in
#
# Copyright (C) 2009, 2010 Arthur de Jong
+# Copyright (C) 2010 Symas Corporation
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -27,14 +28,14 @@ pam_ldap_so_SOURCES = ../nslcd.h ../common/nslcd-prot.h \
pam_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a -lpam \
../compat/libcompat.a
-EXTRA_DIST = pam_ldap.map exports.solaris
-
if USE_NATIVE_LINKER
pam_ldap_so_LINK = @pam_ldap_so_LD@ @pam_ldap_so_LDFLAGS@ -o $@
else
pam_ldap_so_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAG) -o $@
endif
+EXTRA_DIST = pam_ldap.map exports.solaris
+
install-exec-local: install-pam_ldap_so
uninstall-local: uninstall-pam_ldap_so