diff options
author | hjl <hjl> | 2001-03-11 02:54:00 +0000 |
---|---|---|
committer | hjl <hjl> | 2001-03-11 02:54:00 +0000 |
commit | 012d7fd50654b1623e63c447905187929e559cff (patch) | |
tree | 6b2ad84bd781cfae44fd9eeba4c83b5e203ff05d /utils/statd/rmtcall.c | |
parent | 37f276f0627733598230b3953e07be146257619f (diff) | |
download | nfs-utils-012d7fd50654b1623e63c447905187929e559cff.tar.gz nfs-utils-012d7fd50654b1623e63c447905187929e559cff.tar.xz nfs-utils-012d7fd50654b1623e63c447905187929e559cff.zip |
2001-03-10 Tavis Barr <tavis@boole.isetr.columbia.edu>
* utils/rquotad/rquotad.man: Updated for -p.
* utils/statd/statd.man: Likewise.
2001-03-10 Ion Badulescu <ionut@cs.columbia.edu>
* support/nfs/rpcmisc.[ch]: export makesock()
* utils/statd/statd.c: added longopts, added support for
specifying the port to bind to on the command line.
* utils/statd/statd.c: ditto, also specify port used for
outgoing connections.
* utils/statd/Makefile (LIBS): link with our own libnfs
Diffstat (limited to 'utils/statd/rmtcall.c')
-rw-r--r-- | utils/statd/rmtcall.c | 7 |
1 files changed, 4 insertions, 3 deletions
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)) { |