From 5f55781beb8bfc84412127b3777e1d1d126459b6 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 16 Dec 2012 15:11:59 +0000 Subject: switch protocol from host byte order to network byte order and switch use of uid_t and gid_t in the protocol to int32 git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1864 ef36b2f9-881f-0410-afb5-c4e39611909c --- nss/ethers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nss/ethers.c') diff --git a/nss/ethers.c b/nss/ethers.c index e494372..e906b51 100644 --- a/nss/ethers.c +++ b/nss/ethers.c @@ -39,7 +39,7 @@ static nss_status_t read_etherent( size_t bufptr=0; memset(result,0,sizeof(struct etherent)); READ_BUF_STRING(fp,result->e_name); - READ_TYPE(fp,result->e_addr,uint8_t[6]); + READ(fp,&(result->e_addr),sizeof(uint8_t[6])); return NSS_STATUS_SUCCESS; } @@ -60,9 +60,9 @@ nss_status_t _nss_ldap_getntohost_r( const struct ether_addr *addr,struct etherent *result, char *buffer,size_t buflen,int *errnop) { - NSS_BYTYPE(NSLCD_ACTION_ETHER_BYETHER, - *addr,uint8_t[6], - read_etherent(fp,result,buffer,buflen,errnop)); + NSS_BYGEN(NSLCD_ACTION_ETHER_BYETHER, + WRITE(fp,addr,sizeof(uint8_t[6])), + read_etherent(fp,result,buffer,buflen,errnop)); } /* thread-local file pointer to an ongoing request */ -- cgit v1.2.3