From b7c3c078c873b1596519b661fdc5b35d48794ace Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Mon, 4 Oct 2010 19:35:46 +0000 Subject: merge some of the changes for Solaris portability to ease merging, adding --with-pam-seclib-dir, --with-pam-ldap-soname and --with-nss-flavour options and having some auto-detection for SONAMEs and NSS flavour git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1239 ef36b2f9-881f-0410-afb5-c4e39611909c --- nss/networks.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nss/networks.c') diff --git a/nss/networks.c b/nss/networks.c index 8273f27..3c7d10f 100644 --- a/nss/networks.c +++ b/nss/networks.c @@ -2,7 +2,7 @@ networks.c - NSS lookup functions for networks 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 @@ -99,13 +99,6 @@ static nss_status_t read_netent( return retv; } -nss_status_t _nss_ldap_getnetbyname_r(const char *name,struct netent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop) -{ - NSS_BYNAME(NSLCD_ACTION_NETWORK_BYNAME, - name, - read_netent(fp,result,buffer,buflen,errnop,h_errnop)); -} - /* write an address value */ /* version 2.10 of glibc changed the address from network to host order (changelog entry 2009-07-01) */ @@ -114,6 +107,13 @@ nss_status_t _nss_ldap_getnetbyname_r(const char *name,struct netent *result,cha WRITE_INT32(fp,4); \ WRITE_INT32(fp,htonl(addr)); +nss_status_t _nss_ldap_getnetbyname_r(const char *name,struct netent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop) +{ + NSS_BYNAME(NSLCD_ACTION_NETWORK_BYNAME, + name, + read_netent(fp,result,buffer,buflen,errnop,h_errnop)); +} + /* Note: the af parameter is ignored and is assumed to be AF_INET */ /* TODO: implement handling of af parameter */ nss_status_t _nss_ldap_getnetbyaddr_r(uint32_t addr,int UNUSED(af),struct netent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop) -- cgit v1.2.3