projects
/
nfs-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa29d7a
)
Make sure showmount fails when rpc.mountd is not registered
author
Steve Dickson
<steved@redhat.com>
Tue, 18 Mar 2008 13:34:58 +0000
(09:34 -0400)
committer
Steve Dickson
<steved@redhat.com>
Tue, 18 Mar 2008 13:34:58 +0000
(09:34 -0400)
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/showmount/showmount.c
patch
|
blob
|
history
diff --git
a/utils/showmount/showmount.c
b/utils/showmount/showmount.c
index
4e10a29
..
76bef19
100644
(file)
--- a/
utils/showmount/showmount.c
+++ b/
utils/showmount/showmount.c
@@
-240,6
+240,8
@@
static unsigned short getport(struct sockaddr_in *addr,
rpc_createerr.cf_stat = status;
clnt_destroy(client);
return 0;
+ } else if (port == 0) {
+ rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
}
clnt_destroy(client);
@@
-364,7
+366,7
@@
int main(int argc, char **argv)
server_addr.sin_port = getport(&server_addr,
MOUNTPROG, MOUNTVERS, IPPROTO_UDP);
if (!server_addr.sin_port) {
- clnt_pcreateerror("
portmap getpor
t");
+ clnt_pcreateerror("
showmoun
t");
exit(1);
}
msock = RPC_ANYSOCK;