lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1242 - in nss-pam-ldapd-solaris: . nss pam

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1242 - in nss-pam-ldapd-solaris: . nss pam



Author: arthur
Date: Mon Oct  4 22:27:57 2010
New Revision: 1242
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1242

Log:
merge changes from trunk

Modified:
   nss-pam-ldapd-solaris/   (props changed)
   nss-pam-ldapd-solaris/nss/Makefile.am
   nss-pam-ldapd-solaris/nss/aliases.c
   nss-pam-ldapd-solaris/nss/ethers.c
   nss-pam-ldapd-solaris/nss/group.c
   nss-pam-ldapd-solaris/nss/hosts.c
   nss-pam-ldapd-solaris/nss/netgroup.c
   nss-pam-ldapd-solaris/nss/networks.c
   nss-pam-ldapd-solaris/nss/passwd.c
   nss-pam-ldapd-solaris/nss/protocols.c
   nss-pam-ldapd-solaris/nss/rpc.c
   nss-pam-ldapd-solaris/nss/services.c
   nss-pam-ldapd-solaris/nss/shadow.c
   nss-pam-ldapd-solaris/pam/Makefile.am

Modified: nss-pam-ldapd-solaris/nss/Makefile.am
==============================================================================
--- nss-pam-ldapd-solaris/nss/Makefile.am       Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/nss/Makefile.am       Mon Oct  4 22:27:57 2010        
(r1242)
@@ -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 @@
 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 $@

Modified: nss-pam-ldapd-solaris/nss/aliases.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/aliases.c Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/aliases.c Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
   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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/nss/ethers.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/ethers.c  Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/ethers.c  Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
 /* 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 @@
   return retv;
 }
 
+/* close the stream opened with setetherent() above */
 nss_status_t _nss_ldap_endetherent(void)
 {
   NSS_ENDENT(etherentfp);

Modified: nss-pam-ldapd-solaris/nss/group.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/group.c   Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/group.c   Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
 /* 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 @@
 
 #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 @@
   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 @@
 /* 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_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,

Modified: nss-pam-ldapd-solaris/nss/hosts.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/hosts.c   Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/hosts.c   Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
   return retv;
 }
 
+/* close the stream opened with sethostent() above */
 nss_status_t _nss_ldap_endhostent(void)
 {
   NSS_ENDENT(hostentfp);

Modified: nss-pam-ldapd-solaris/nss/netgroup.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/netgroup.c        Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/nss/netgroup.c        Mon Oct  4 22:27:57 2010        
(r1242)
@@ -92,7 +92,9 @@
 /* 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 @@
   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);

Modified: nss-pam-ldapd-solaris/nss/networks.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/networks.c        Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/nss/networks.c        Mon Oct  4 22:27:57 2010        
(r1242)
@@ -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 @@
 
 #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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/nss/passwd.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/passwd.c  Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/passwd.c  Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
 
 #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 @@
   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 @@
 /* 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 @@
 
 /* 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));

Modified: nss-pam-ldapd-solaris/nss/protocols.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/protocols.c       Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/nss/protocols.c       Mon Oct  4 22:27:57 2010        
(r1242)
@@ -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 @@
 
 #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 @@
   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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/nss/rpc.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/rpc.c     Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/rpc.c     Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
 
 #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 @@
   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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/nss/services.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/services.c        Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/nss/services.c        Mon Oct  4 22:27:57 2010        
(r1242)
@@ -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 @@
   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 @@
 
 #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 @@
   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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/nss/shadow.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/shadow.c  Mon Oct  4 22:07:40 2010        (r1241)
+++ nss-pam-ldapd-solaris/nss/shadow.c  Mon Oct  4 22:27:57 2010        (r1242)
@@ -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 @@
 
 #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 @@
 /* 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);

Modified: nss-pam-ldapd-solaris/pam/Makefile.am
==============================================================================
--- nss-pam-ldapd-solaris/pam/Makefile.am       Mon Oct  4 22:07:40 2010        
(r1241)
+++ nss-pam-ldapd-solaris/pam/Makefile.am       Mon Oct  4 22:27:57 2010        
(r1242)
@@ -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_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
 
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits