lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1747 - nss-pam-ldapd/nss

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

nss-pam-ldapd commit: r1747 - nss-pam-ldapd/nss



Author: arthur
Date: Mon Sep  3 23:04:35 2012
New Revision: 1747
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1747&view=revision

Log:
on Solaris store the errno value in NSS_ARGS(args)->erange

Modified:
   nss-pam-ldapd/nss/ethers.c
   nss-pam-ldapd/nss/group.c
   nss-pam-ldapd/nss/hosts.c
   nss-pam-ldapd/nss/netgroup.c
   nss-pam-ldapd/nss/networks.c
   nss-pam-ldapd/nss/passwd.c
   nss-pam-ldapd/nss/protocols.c
   nss-pam-ldapd/nss/rpc.c
   nss-pam-ldapd/nss/services.c
   nss-pam-ldapd/nss/shadow.c

Modified: nss-pam-ldapd/nss/ethers.c
==============================================================================
--- nss-pam-ldapd/nss/ethers.c  Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/ethers.c  Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    ethers.c - NSS lookup functions for ethers database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -108,7 +108,7 @@
   buffer=(char *)malloc(args->buf.buflen);
   if (buffer==NULL)
     return NSS_STATUS_UNAVAIL;
-  retv=read_etherent(fp,&result,buffer,args->buf.buflen,&errno);
+  
retv=read_etherent(fp,&result,buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
   {
     free(buffer);
@@ -127,7 +127,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_etherent(fp,(struct etherent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_etherent(fp,(struct etherent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_etherstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -135,7 +135,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_etherent(fp,(struct etherent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_etherent(fp,(struct etherent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/group.c
==============================================================================
--- nss-pam-ldapd/nss/group.c   Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/group.c   Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    group.c - NSS lookup functions for group database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2009, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -196,7 +196,7 @@
   buffer=(char *)malloc(args->buf.buflen);
   if (buffer==NULL)
     return NSS_STATUS_UNAVAIL;
-  retv=read_group(fp,&result,buffer,args->buf.buflen,&errno);
+  retv=read_group(fp,&result,buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
   {
     free(buffer);
@@ -224,7 +224,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_group(fp,(struct group 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_group(fp,(struct group 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_groupstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -232,7 +232,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_group(fp,(struct group 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_group(fp,(struct group 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 
@@ -280,7 +280,7 @@
   gid_t skipgroup=(start>0)?argp->gid_array[0]:(gid_t)-1;
   NSS_BYNAME(NSLCD_ACTION_GROUP_BYMEMBER,
              argp->username,
-             read_gids(fp,skipgroup,&start,NULL,(gid_t 
**)&argp->gid_array,argp->maxgids,&errno);
+             read_gids(fp,skipgroup,&start,NULL,(gid_t 
**)&argp->gid_array,argp->maxgids,&NSS_ARGS(args)->erange);
              argp->numgids=(int)start;);
 }
 

Modified: nss-pam-ldapd/nss/hosts.c
==============================================================================
--- nss-pam-ldapd/nss/hosts.c   Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/hosts.c   Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    hosts.c - NSS lookup functions for hosts database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -260,9 +260,9 @@
   int i;
   /* read the hostent */
   if (erronempty)
-    
retv=read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
+    
retv=read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
   else
-    
retv=read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
+    
retv=read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -305,14 +305,14 @@
 
 #define READ_RESULT_ERRONEMPTY(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno)):
 \
+    read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno)):
 \
     read_hoststring(fp,args,1); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 
 #define READ_RESULT_NEXTONEMPTY(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno)):
 \
+    read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno)):
 \
     read_hoststring(fp,args,0); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -320,12 +320,12 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT_ERRONEMPTY(fp) \
-  read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
 \
+  read_hostent_erronempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 
 #define READ_RESULT_NEXTONEMPTY(fp) \
-  read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
 \
+  read_hostent_nextonempty(fp,NSS_ARGS(args)->key.hostaddr.type,(struct 
hostent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/netgroup.c
==============================================================================
--- nss-pam-ldapd/nss/netgroup.c        Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/netgroup.c        Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    netgroup.c - NSS lookup functions for netgroup entries
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -166,14 +166,11 @@
   }
 }
 
-static nss_status_t netgroup_nslcd_setnetgrent(nss_backend_t *be,const char 
*group)
+static nss_status_t netgroup_nslcd_setnetgrent(nss_backend_t *be,const char 
*group,int *errnop)
 {
   /* we cannot use NSS_SETENT() here because we have a parameter that is only
      available in this function */
   int32_t tmpint32;
-  int errnocp;
-  int *errnop;
-  errnop=&errnocp;
   /* check parameter */
   if ((group==NULL)||(group[0]=='\0'))
     return NSS_STATUS_UNAVAIL;
@@ -224,7 +221,7 @@
           }
           else
           {
-            rc=netgroup_nslcd_setnetgrent(be,group);
+            rc=netgroup_nslcd_setnetgrent(be,group,&NSS_ARGS(args)->erange);
             if (rc==NSS_STATUS_SUCCESS)
               found=1;
             free(group);
@@ -303,7 +300,7 @@
   ngbe->seen_groups=set_new();
   ngbe->unseen_groups=set_new();
   /* start the first search */
-  retv=netgroup_nslcd_setnetgrent(be,SETNETGRENT_ARGS(args)->netgroup);
+  
retv=netgroup_nslcd_setnetgrent(be,SETNETGRENT_ARGS(args)->netgroup,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
   {
     netgroup_setnetgrent_destructor(be,args);

Modified: nss-pam-ldapd/nss/networks.c
==============================================================================
--- nss-pam-ldapd/nss/networks.c        Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/networks.c        Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    networks.c - NSS lookup functions for networks database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010, 2011 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2011, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -172,7 +172,7 @@
   int i;
   struct in_addr priv_in_addr;
   /* read the netent */
-  
retv=read_netent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
+  
retv=read_netent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -198,7 +198,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_netent(fp,(struct netent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno)):
 \
+    read_netent(fp,(struct netent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno)):
 \
     read_netentstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -206,7 +206,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_netent(fp,(struct netent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno,&(NSS_ARGS(args)->h_errno));
 \
+  read_netent(fp,(struct netent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange,&(NSS_ARGS(args)->h_errno));
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/passwd.c
==============================================================================
--- nss-pam-ldapd/nss/passwd.c  Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/passwd.c  Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    passwd.c - NSS lookup functions for passwd database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -106,7 +106,7 @@
   char *buffer;
   size_t buflen;
   /* read the passwd */
-  
retv=read_passwd(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+  
retv=read_passwd(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -127,7 +127,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_passwd(fp,(struct passwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_passwd(fp,(struct passwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_passwdstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -135,7 +135,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_passwd(fp,(struct passwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_passwd(fp,(struct passwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/protocols.c
==============================================================================
--- nss-pam-ldapd/nss/protocols.c       Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/protocols.c       Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    protocols.c - NSS lookup functions for protocol database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -103,7 +103,7 @@
   size_t buflen;
   int i;
   /* read the protoent */
-  
retv=read_protoent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+  
retv=read_protoent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -128,7 +128,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_protoent(fp,(struct protoent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_protoent(fp,(struct protoent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_protostring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -136,7 +136,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_protoent(fp,(struct protoent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_protoent(fp,(struct protoent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/rpc.c
==============================================================================
--- nss-pam-ldapd/nss/rpc.c     Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/rpc.c     Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    rpc.c - NSS lookup functions for rpc database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -103,7 +103,7 @@
   size_t buflen;
   int i;
   /* read the rpcent */
-  
retv=read_rpcent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+  
retv=read_rpcent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -128,7 +128,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_rpcent(fp,(struct rpcent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_rpcent(fp,(struct rpcent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_rpcstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -136,7 +136,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_rpcent(fp,(struct rpcent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_rpcent(fp,(struct rpcent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/services.c
==============================================================================
--- nss-pam-ldapd/nss/services.c        Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/services.c        Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    service.c - NSS lookup functions for services database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -107,7 +107,7 @@
   size_t buflen;
   int i;
   /* read the servent */
-  
retv=read_servent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+  
retv=read_servent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -132,7 +132,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_servent(fp,(struct servent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_servent(fp,(struct servent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_servstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -140,7 +140,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_servent(fp,(struct servent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_servent(fp,(struct servent 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 

Modified: nss-pam-ldapd/nss/shadow.c
==============================================================================
--- nss-pam-ldapd/nss/shadow.c  Sat Sep  1 23:25:41 2012        (r1746)
+++ nss-pam-ldapd/nss/shadow.c  Mon Sep  3 23:04:35 2012        (r1747)
@@ -2,7 +2,7 @@
    shadow.c - NSS lookup functions for shadow database
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
    Copyright (C) 2010 Symas Corporation
 
    This library is free software; you can redistribute it and/or
@@ -99,7 +99,7 @@
   char field_buf[128];
   size_t buflen;
   /* read the spwd */
-  
retv=read_spwd(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+  
retv=read_spwd(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
   if (retv!=NSS_STATUS_SUCCESS)
     return retv;
   /* allocate a temporary buffer */
@@ -153,7 +153,7 @@
 
 #define READ_RESULT(fp) \
   NSS_ARGS(args)->buf.result? \
-    read_spwd(fp,(struct spwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno):
 \
+    read_spwd(fp,(struct spwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange):
 \
     read_spwdstring(fp,args); \
   if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -161,7 +161,7 @@
 #else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
 
 #define READ_RESULT(fp) \
-  read_spwd(fp,(struct spwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno);
 \
+  read_spwd(fp,(struct spwd 
*)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange);
 \
   if (retv==NSS_STATUS_SUCCESS) \
     NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
 
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/