summaryrefslogtreecommitdiffstats
path: root/utils/mount/network.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-07-14 16:34:20 -0400
committerSteve Dickson <steved@redhat.com>2009-07-14 16:34:20 -0400
commit19ba81f64447dca205362a119f1e72701438aecc (patch)
tree2251c60ffeed9c867488152a4e1f8ee9b1b05d29 /utils/mount/network.h
parent3fc80f43ffb272036188d070a01090bbf243b7b5 (diff)
downloadnfs-utils-19ba81f64447dca205362a119f1e72701438aecc.tar.gz
nfs-utils-19ba81f64447dca205362a119f1e72701438aecc.tar.xz
nfs-utils-19ba81f64447dca205362a119f1e72701438aecc.zip
mount.nfs: make nfs_options2pmap return errors
Up until now, nfs_options2pmap() has been passed mount options that have already gone through the kernel's parser successfully. So, it never had to check for invalid mount option values. However, we are about to pass it options that come right from the user. So nfs_options2pmap() will now need to report an error and fail if it encounters a bogus value for any of the options it cares about. ===== Note that nfs_options2pmap() will allow a bogus value for an option if the same option is specified farther to the right with a useable value. For example, if a user specifies "proto=foo,...,tcp" then nfs_options2pmap() uses "tcp" and ignores "proto=foo". However, if the options are specified in the other order: "tcp,...,proto=foo" then nfs_options2pmap() will fail. This is a simple and unambiguous extension of the "rightmost wins" rule. Since mount.nfs strips out these options out and replaces them with the rpcbind-negotiated options before invoking mount(2), the kernel should never receive bogus values for these options from mount.nfs in such cases. This is probably slightly more flexible behavior than the legacy mount implementation, but should be harmless. All mount options unrelated to pmap are ignored by nfs_options2pmap(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/network.h')
-rw-r--r--utils/mount/network.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/mount/network.h b/utils/mount/network.h
index b3f9bd2..ca5fa3b 100644
--- a/utils/mount/network.h
+++ b/utils/mount/network.h
@@ -57,7 +57,7 @@ int clnt_ping(struct sockaddr_in *, const unsigned long,
struct mount_options;
-void nfs_options2pmap(struct mount_options *,
+int nfs_options2pmap(struct mount_options *,
struct pmap *, struct pmap *);
int start_statd(void);