diff options
author | Neil Brown <neilb@suse.de> | 2007-04-16 11:15:40 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-04-16 11:15:40 +1000 |
commit | 0210f16cf1bd2f87b7fe4336311c6dfd88030f8b (patch) | |
tree | 575be7b8a1bec8f6690e2f4c38722ec4eb0d857e /support/nfs/svc_socket.c | |
parent | ec79b7a3b06c034a9a71a39a5ac24b66dbd475a6 (diff) | |
download | nfs-utils-0210f16cf1bd2f87b7fe4336311c6dfd88030f8b.tar.gz nfs-utils-0210f16cf1bd2f87b7fe4336311c6dfd88030f8b.tar.xz nfs-utils-0210f16cf1bd2f87b7fe4336311c6dfd88030f8b.zip |
Be more cautious about use for privilege ports (<1024).
Ports < 1024 are a scarce resource and should not be used
carelessly. Technically they should be not used at all without
registration with IANA, but sometimes we need them despite that.
So: for the socket that RPC services listen on, don't use a <1024 port
by default. There is no need.
For sockets that we send messages on, that are long-lived, and that might
need to appear 'privileged', avoid using a number that is registered in
/etc/services if possible.
Diffstat (limited to 'support/nfs/svc_socket.c')
-rw-r--r-- | support/nfs/svc_socket.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/support/nfs/svc_socket.c b/support/nfs/svc_socket.c index 6799d16..f44217a 100644 --- a/support/nfs/svc_socket.c +++ b/support/nfs/svc_socket.c @@ -101,8 +101,6 @@ svc_socket (u_long number, int type, int protocol, int reuse) } else { - if (bindresvport (sock, &addr)) - { addr.sin_port = 0; if (bind (sock, (struct sockaddr *) &addr, len) < 0) { @@ -110,7 +108,6 @@ svc_socket (u_long number, int type, int protocol, int reuse) (void) __close (sock); sock = -1; } - } } if (sock >= 0) |