summaryrefslogtreecommitdiff
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-03-23 09:21:25 -0400
committerJeff Layton <jlayton@redhat.com>2010-03-23 09:21:25 -0400
commitc0371fced801f70cdf90f8bfcaf3413b93b6f491 (patch)
tree4fb9cd8dfaa3d6561e235146d270110a1d077425 /mount.cifs.c
parentd8f8e0b6dd2f85c0b4ed597bdf2ac2fad113e51f (diff)
downloadcifs-utils-c0371fced801f70cdf90f8bfcaf3413b93b6f491.tar.gz
cifs-utils-c0371fced801f70cdf90f8bfcaf3413b93b6f491.tar.bz2
cifs-utils-c0371fced801f70cdf90f8bfcaf3413b93b6f491.zip
mount.cifs: fix ver= option passed to the kernel
Rather than passing the VERSION string to the kernel in the ver= option, track the OPTIONS_VERSION separately and pass that to the kernel. If we ever need to have different behavior in kernel for different mount.cifs versions, we can bump this number. Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mount.cifs.c b/mount.cifs.c
index 312b34a..4211b4d 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -71,6 +71,12 @@
#define MAX_ADDRESS_LEN INET6_ADDRSTRLEN
/*
+ * value of the ver= option that gets passed to the kernel. Used to indicate
+ * behavioral changes introduced in the mount helper.
+ */
+#define OPTIONS_VERSION "1"
+
+/*
* mount.cifs has been the subject of many "security" bugs that have arisen
* because of users and distributions installing it as a setuid root program.
* mount.cifs has not been audited for security. Thus, we strongly recommend
@@ -1503,7 +1509,7 @@ mount_retry:
}
strlcat(options,",ver=",options_size);
- strlcat(options,VERSION,options_size);
+ strlcat(options,OPTIONS_VERSION,options_size);
if(orgoptions) {
strlcat(options,",",options_size);