diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-10-21 09:43:30 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-10-21 09:43:30 +0200 |
commit | 6248fd49171b69d4a86cb5a0aa2ebb1cff15fc69 (patch) | |
tree | e03189d34592e9b008ef3e0d05405c25acfa0249 /nss | |
parent | f0cff87ce08c6a1c470f68f43d1fc369e6ad6930 (diff) |
correct calls to NSLCD_ACTION_NETWORK_BYNAME and NSLCD_ACTION_NETWORK_BYADDR and get address in correct byte order with the last call
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@449 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss')
-rw-r--r-- | nss/networks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nss/networks.c b/nss/networks.c index 100dd73..18d8f4e 100644 --- a/nss/networks.c +++ b/nss/networks.c @@ -110,7 +110,7 @@ static enum nss_status read_netent( enum nss_status _nss_ldap_getnetbyname_r(const char *name,struct netent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop) { - NSS_BYNAME(NSLCD_ACTION_HOST_BYNAME, + NSS_BYNAME(NSLCD_ACTION_NETWORK_BYNAME, name, read_netent(fp,result,buffer,buflen,errnop,h_errnop)); } @@ -125,8 +125,8 @@ enum nss_status _nss_ldap_getnetbyname_r(const char *name,struct netent *result, /* TODO: implement handling of af parameter */ enum nss_status _nss_ldap_getnetbyaddr_r(uint32_t addr,int UNUSED(af),struct netent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop) { - NSS_BYGEN(NSLCD_ACTION_HOST_BYADDR, - addr=htonl(addr);WRITE_ADDRESS(fp,AF_INET,4,&addr), + NSS_BYGEN(NSLCD_ACTION_NETWORK_BYADDR, + WRITE_ADDRESS(fp,AF_INET,4,&addr), read_netent(fp,result,buffer,buflen,errnop,h_errnop)) } |