]>
Commit | Line | Data |
---|---|---|
22ab1e18 JR |
1 | --- util-linux-2.10f/mount/rpcsvc/nfsmount.x.rpc Mon Feb 28 16:00:44 2000 |
2 | +++ util-linux-2.10f/mount/rpcsvc/nfsmount.x Mon Feb 28 16:01:15 2000 | |
3 | @@ -48,7 +48,6 @@ | |
4 | #endif | |
5 | %#include <asm/types.h> | |
6 | ||
7 | -const MOUNTPORT = 635; | |
8 | const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ | |
9 | const MNTNAMLEN = 255; /* maximum bytes in a name argument */ | |
10 | const FHSIZE = 32; /* size in bytes of a file handle */ | |
11 | --- util-linux-2.10f/mount/nfsmount.x.rpc Mon Feb 28 15:53:09 2000 | |
12 | +++ util-linux-2.10f/mount/nfsmount.x Mon Feb 28 16:01:20 2000 | |
13 | @@ -48,7 +48,6 @@ | |
14 | #endif | |
15 | %#include <asm/types.h> | |
16 | ||
17 | -const MOUNTPORT = 635; | |
18 | const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ | |
19 | const MNTNAMLEN = 255; /* maximum bytes in a name argument */ | |
20 | const FHSIZE = 32; /* size in bytes of a file handle */ | |
21 | --- util-linux-2.10f/mount/rpcsvc/nfsmount.h.rpc Mon Feb 28 15:53:19 2000 | |
22 | +++ util-linux-2.10f/mount/rpcsvc/nfsmount.h Mon Feb 28 16:01:26 2000 | |
23 | @@ -45,7 +45,6 @@ | |
24 | #ifndef _rpcsvc_mount_h | |
25 | #define _rpcsvc_mount_h | |
26 | #include <asm/types.h> | |
27 | -#define MOUNTPORT 635 | |
28 | #define MNTPATHLEN 1024 | |
29 | #define MNTNAMLEN 255 | |
30 | #define FHSIZE 32 | |
31 | --- util-linux-2.10f/mount/nfsmount.c.rpc Mon Feb 28 16:01:40 2000 | |
32 | +++ util-linux-2.10f/mount/nfsmount.c Mon Feb 28 16:07:34 2000 | |
33 | @@ -149,6 +149,9 @@ static struct pmap p = {0, 0, 0, 0}; | |
34 | server_addr->sin_port = PMAPPORT; | |
35 | pmap = pmap_getmaps(server_addr); | |
36 | ||
37 | +if (!pmap) | |
38 | + return NULL; | |
39 | + | |
40 | if (version > MAX_NFSPROT) | |
41 | version = MAX_NFSPROT; | |
42 | if (!prog) | |
43 | @@ -177,8 +180,6 @@ next: | |
44 | } | |
45 | if (!p.pm_vers) | |
46 | p.pm_vers = MOUNTVERS; | |
47 | -if (!p.pm_port) | |
48 | - p.pm_port = MOUNTPORT; | |
49 | if (!p.pm_prot) | |
50 | p.pm_prot = IPPROTO_TCP; | |
51 | return &p; | |
52 | @@ -575,6 +576,12 @@ int nfsmount(const char *spec, const cha | |
53 | mountvers, | |
54 | proto, | |
55 | mountport); | |
56 | + | |
57 | + if (pm_mnt == NULL) { | |
58 | + fprintf(stderr, _("mount: cannot access portmapper on %s: %s\n"), | |
59 | + hostname, strerror (errno)); | |
60 | + goto fail; | |
61 | + } | |
62 | ||
63 | /* contact the mount daemon via TCP */ | |
64 | mount_server_addr.sin_port = htons(pm_mnt->pm_port); |