cifs-utils/9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07.diff
Lars Müller bab4f11c74 - mount.cifs: don't pass credentials= option to the kernel.
- doc: update mailing list.
- mount.cifs: don't send a mandatory ver= option to the kernel.
- mount.cifs: remove smb2 multicall binary code.
- doc: remove old XML sources for mount.cifs.8 and cifs.upcall.8.
- mount.cifs: unused variables.

OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=58
2012-05-26 11:44:52 +00:00

65 lines
2.3 KiB
Diff

commit 9e3c3c4b4ae4c3e9eb2eb6297c31c50337b2fd07
Author: Jeff Layton <jlayton@samba.org>
Date: Thu May 17 06:46:38 2012 -0400
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>
Index: mount.cifs.c
===================================================================
--- mount.cifs.c.orig
+++ 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_i
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,