aboutsummaryrefslogtreecommitdiffstats
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2012-05-17 06:46:38 -0400
committerJeff Layton <jlayton@samba.org>2012-05-17 06:46:38 -0400
commit9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07 (patch)
treef76deb67bfc697829189e669cbd9b0887327ffaa /mount.cifs.c
parent9410c776a3bd69a8434e5f01174bc59f08e7e62a (diff)
downloadcifs-utils-9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07.tar.gz
cifs-utils-9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07.tar.xz
cifs-utils-9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07.zip
mount.cifs: don't send a mandatory ver= option to the kernel
Traditionally, this ver= option was used to specify the "options version" that we're passing in. It has always been set to '1' though and we have never changed that. Eventually we want to have a ver= (or vers=) option that allows users to specify the SMB version that they want to use to talk to the server. At that point, this option will just get in the way. Let's go ahead and remove it now in preparation for that day. Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/mount.cifs.c b/mount.cifs.c
index 0408158..3041987 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -100,12 +100,6 @@
#define MAX_DOMAIN_SIZE 64
/*
- * 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
* before it had been audited for security holes. The default behavior is
@@ -1833,21 +1827,21 @@ assemble_mountinfo(struct parsed_mount_info *parsed_info,
goto assemble_exit;
}
- /* copy in ver= string. It's not really needed, but what the hell */
- if (*parsed_info->options)
- strlcat(parsed_info->options, ",", sizeof(parsed_info->options));
- strlcat(parsed_info->options, "ver=", sizeof(parsed_info->options));
- strlcat(parsed_info->options, OPTIONS_VERSION, sizeof(parsed_info->options));
-
/* copy in user= string */
if (parsed_info->got_user) {
- strlcat(parsed_info->options, ",user=",
+ if (*parsed_info->options)
+ strlcat(parsed_info->options, ",",
+ sizeof(parsed_info->options));
+ strlcat(parsed_info->options, "user=",
sizeof(parsed_info->options));
strlcat(parsed_info->options, parsed_info->username,
sizeof(parsed_info->options));
}
if (*parsed_info->domain) {
+ if (*parsed_info->options)
+ strlcat(parsed_info->options, ",",
+ sizeof(parsed_info->options));
strlcat(parsed_info->options, ",domain=",
sizeof(parsed_info->options));
strlcat(parsed_info->options, parsed_info->domain,