Index: freebsd-head/usr.bin/quota/quota.c =================================================================== --- freebsd-head/usr.bin/quota/quota.c (revision 239276) +++ freebsd-head/usr.bin/quota/quota.c (working copy) @@ -657,28 +657,17 @@ static int callaurpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out) { - struct sockaddr_in server_addr; enum clnt_stat clnt_stat; - struct hostent *hp; struct timeval timeout, tottimeout; CLIENT *client = NULL; - int sock = RPC_ANYSOCK; - if ((hp = gethostbyname(host)) == NULL) - return ((int) RPC_UNKNOWNHOST); timeout.tv_usec = 0; timeout.tv_sec = 6; - bcopy(hp->h_addr, &server_addr.sin_addr, - MIN(hp->h_length,(int)sizeof(server_addr.sin_addr))); - server_addr.sin_family = AF_INET; - server_addr.sin_port = 0; + if ((client = clnt_create_timed(host, prognum, + versnum, "udp", &timeout)) == NULL) - if ((client = clntudp_create(&server_addr, prognum, - versnum, timeout, &sock)) == NULL) - return ((int) rpc_createerr.cf_stat); - - client->cl_auth = authunix_create_default(); + client->cl_auth = authsys_create_default(); tottimeout.tv_sec = 25; tottimeout.tv_usec = 0; clnt_stat = clnt_call(client, procnum, inproc, in,