]> git.decadent.org.uk Git - nfs-utils.git/commit
nfs-utils: query for remote port using rpcbind instead of getaddrinfo
authorJeff Layton <jlayton@redhat.com>
Wed, 15 Apr 2009 15:36:07 +0000 (11:36 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 15 Apr 2009 15:36:07 +0000 (11:36 -0400)
commitd9c3935de6c82cea687544c5d45d999297da141d
treed446ee400afcf18888d0fb7be97b0df4be749e68
parent59189376db057ae08a710cb2b258426230f687d7
nfs-utils: query for remote port using rpcbind instead of getaddrinfo

We already have the server's address from the upcall, so we don't really
need to look it up again, and querying the local services DB for the
port that the remote server is listening on is just plain wrong.

Use rpcbind to set the port for the program and version that we were
given in the upcall. The exception here is NFSv4. Since NFSv4 mounts
are supposed to use a well-defined port then skip the rpcbind query
for that and just set the port to the standard one (2049).

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd_proc.c