From 9ee7da8230adead93a1b42b1ac2c78e02227fe15 Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 21 Mar 2001 19:20:11 +0000 Subject: 2001-03-21 H.J. Lu * nfs-utils.spec: Regenerated. (Release): Set to 3. 2001-03-21 Ion Badulescu * utils/statd/statd.c (main): make sure file descriptors 0-2 are open to /dev/null. 2001-03-21 H.J. Lu * support/nfs/rpcmisc.c: Restore the change made on 2001-03-10. * support/nfs/rpcmisc.c: Likewise. * utils/rquotad/rquota_svc.c: Likewise. * utils/rquotad/rquotad.man: Likewise. * utils/statd/Makefile: Likewise. * utils/statd/rmtcall.c: Likewise. * utils/statd/simulate.c: Likewise. * utils/statd/statd.c: Likewise. * utils/statd/statd.man: Likewise. --- utils/statd/rmtcall.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils/statd/rmtcall.c') diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c index b70e5bb..f01faba 100644 --- a/utils/statd/rmtcall.c +++ b/utils/statd/rmtcall.c @@ -47,8 +47,8 @@ static int sockfd = -1; /* notify socket */ /* * Initialize callback socket */ -static int -get_socket(void) +int +statd_get_socket(int port) { struct sockaddr_in sin; @@ -64,6 +64,7 @@ get_socket(void) memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; + sin.sin_port = port; if (bindresvport(sockfd, &sin) < 0) { dprintf(L_WARNING, "process_hosts: can't bind to reserved port\n"); @@ -394,7 +395,7 @@ process_notify_list(void) time_t now; int fd; - if ((fd = get_socket()) < 0) + if ((fd = statd_get_socket(0)) < 0) return 0; while ((entry = notify) != NULL && NL_WHEN(entry) < time(&now)) { -- cgit