nfs-utils/nfs-utils-1.1.0-showmount-rpcerror.patch

21 lines
689 B
Diff

--- nfs-utils-1.1.0/utils/showmount/showmount.c.orig 2007-05-10 23:40:57.000000000 -0400
+++ nfs-utils-1.1.0/utils/showmount/showmount.c 2007-07-16 13:02:42.000000000 -0400
@@ -242,6 +242,8 @@ static unsigned short getport(struct soc
rpc_createerr.cf_stat = status;
clnt_destroy(client);
return 0;
+ } else if (port == 0) {
+ rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
}
clnt_destroy(client);
@@ -368,7 +370,7 @@ char **argv;
server_addr.sin_port = getport(&server_addr,
MOUNTPROG, MOUNTVERS, IPPROTO_UDP);
if (!server_addr.sin_port) {
- clnt_pcreateerror("portmap getport");
+ clnt_pcreateerror("showmount");
exit(1);
}
msock = RPC_ANYSOCK;