summaryrefslogtreecommitdiffstats
path: root/utils/showmount/showmount.c
diff options
context:
space:
mode:
authorchip <chip>2001-11-26 19:57:30 +0000
committerchip <chip>2001-11-26 19:57:30 +0000
commitac84b80afc13d5a96813e678ad5c86c6036f022e (patch)
treef7ec7c94f0ac960c446df48be27f68e4733e10ac /utils/showmount/showmount.c
parent7a95c7d38ec451cf3736d485899d980216364c0f (diff)
downloadnfs-utils-ac84b80afc13d5a96813e678ad5c86c6036f022e.tar.gz
nfs-utils-ac84b80afc13d5a96813e678ad5c86c6036f022e.tar.xz
nfs-utils-ac84b80afc13d5a96813e678ad5c86c6036f022e.zip
2001-11-26 Chip Salzenberg <chip@pobox.com>
* utils/showmount/showmount.c (main): Don't assume that strings starting with digits are IP addresses. * utils/nfsd/nfsd.c (main): Close all fds and reopen 0,1,2 on /dev/null before nfssvc(). Use syslog to report nfssvc errors. * support/misc/tcpwrapper.c, utils/mountd/mountd.man, utils/rquotad/rquotad.man, utils/statd/statd.man: Fix comments and man pages: We check host names *and* addresses with tcpwrappers.
Diffstat (limited to 'utils/showmount/showmount.c')
-rw-r--r--utils/showmount/showmount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c
index 47b5825..1ff3fa1 100644
--- a/utils/showmount/showmount.c
+++ b/utils/showmount/showmount.c
@@ -154,9 +154,8 @@ char **argv;
break;
}
- if (hostname[0] >= '0' && hostname[0] <= '9') {
+ if (inet_aton(hostname, &server_addr.sin_addr.s_addr)) {
server_addr.sin_family = AF_INET;
- server_addr.sin_addr.s_addr = inet_addr(hostname);
}
else {
if ((hp = gethostbyname(hostname)) == NULL) {