From 090ca0002ff8ee4ca425bc6088cc097f46c67626 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Nov 1998 11:05:09 +0000 Subject: Update. 1998-11-18 Ulrich Drepper * io/Makefile (CFLAGS-ftw.c): Removed. 1998-11-18 Andreas Schwab * io/Makefile (tests): Make sure that the test program has an explicit directory part. 1998-11-18 Andreas Schwab * configure.in: Fix last change. 1998-11-18 Thorsten Kukuk * sunrpc/Makefile (routines): Add create_xid. * sunrpc/clnt_tcp.c: Use non-guessable xid. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/create_xid.c: New, create non-guessable xid. * sunrpc/svc_tcp.c: Remove patch from 1998-06-15, use poll instead of select. * sunrpc/svc_unix.c: Use poll instead of select. --- sunrpc/pmap_rmt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sunrpc/pmap_rmt.c') diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index ced817d..e0f52c9 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -56,6 +56,8 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #include #define MAX_BROADCAST_SIZE 1400 +extern u_long _create_xid (void); + static struct timeval timeout = {3, 0}; /* @@ -112,9 +114,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p * written for XDR_ENCODE direction only */ bool_t -xdr_rmtcall_args (xdrs, cap) - XDR *xdrs; - struct rmtcallargs *cap; +xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) { u_int lenposition, argposition, position; @@ -237,6 +237,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) AUTH *unix_auth = authunix_create_default (); XDR xdr_stream; XDR *xdrs = &xdr_stream; + struct timeval t; int outlen, inlen, nets; socklen_t fromlen; int sock; @@ -252,7 +253,6 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) struct rmtcallargs a; struct rmtcallres r; struct rpc_msg msg; - struct timeval t; char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE]; /* @@ -281,8 +281,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) baddr.sin_port = htons (PMAPPORT); baddr.sin_addr.s_addr = htonl (INADDR_ANY); /* baddr.sin_addr.S_un.S_addr = htonl(INADDR_ANY); */ - (void) __gettimeofday (&t, (struct timezone *) 0); - msg.rm_xid = xid = __getpid () ^ t.tv_sec ^ t.tv_usec; + msg.rm_xid = xid = _create_xid (); t.tv_usec = 0; msg.rm_direction = CALL; msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; -- cgit v1.1