Add patch to fix CIFS password mount option parsing (rhbz 832741)
- Add patch to fix udl device binding (rhbz 832188)
This commit is contained in:
parent
8b4ddbe29f
commit
fd269b5b6a
|
@ -0,0 +1,86 @@
|
|||
From e73f843a3235a19de38359c91586e9eadef12238 Mon Sep 17 00:00:00 2001
|
||||
From: Suresh Jayaraman <sjayaraman@suse.com>
|
||||
Date: Tue, 12 Jun 2012 07:15:50 +0530
|
||||
Subject: [PATCH] cifs: fix parsing of password mount option
|
||||
|
||||
The double delimiter check that allows a comma in the password parsing code is
|
||||
unconditional. We set "tmp_end" to the end of the string and we continue to
|
||||
check for double delimiter. In the case where the password doesn't contain a
|
||||
comma we end up setting tmp_end to NULL and eventually setting "options" to
|
||||
"end". This results in the premature termination of the options string and hence
|
||||
the values of UNCip and UNC are being set to NULL. This results in mount failure
|
||||
with "Connecting to DFS root not implemented yet" error.
|
||||
|
||||
This error is usually not noticable as we have password as the last option in
|
||||
the superblock mountdata. But when we call expand_dfs_referral() from
|
||||
cifs_mount() and try to compose mount options for the submount, the resulting
|
||||
mountdata will be of the form
|
||||
|
||||
",ver=1,user=foo,pass=bar,ip=x.x.x.x,unc=\\server\share"
|
||||
|
||||
and hence results in the above error. This bug has been seen with older NAS
|
||||
servers running Samba 3.0.24.
|
||||
|
||||
Fix this by moving the double delimiter check inside the conditional loop.
|
||||
|
||||
Changes since -v1
|
||||
|
||||
- removed the wrong strlen() micro optimization.
|
||||
|
||||
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.com>
|
||||
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
|
||||
Cc: stable@vger.kernel.org [3.1+]
|
||||
Signed-off-by: Steve French <sfrench@us.ibm.com>
|
||||
---
|
||||
fs/cifs/connect.c | 32 +++++++++++++++++---------------
|
||||
1 files changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
|
||||
index 78db68a..5b38407 100644
|
||||
--- a/fs/cifs/connect.c
|
||||
+++ b/fs/cifs/connect.c
|
||||
@@ -1653,24 +1653,26 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
|
||||
* If yes, we have encountered a double deliminator
|
||||
* reset the NULL character to the deliminator
|
||||
*/
|
||||
- if (tmp_end < end && tmp_end[1] == delim)
|
||||
+ if (tmp_end < end && tmp_end[1] == delim) {
|
||||
tmp_end[0] = delim;
|
||||
|
||||
- /* Keep iterating until we get to a single deliminator
|
||||
- * OR the end
|
||||
- */
|
||||
- while ((tmp_end = strchr(tmp_end, delim)) != NULL &&
|
||||
- (tmp_end[1] == delim)) {
|
||||
- tmp_end = (char *) &tmp_end[2];
|
||||
- }
|
||||
+ /* Keep iterating until we get to a single
|
||||
+ * deliminator OR the end
|
||||
+ */
|
||||
+ while ((tmp_end = strchr(tmp_end, delim))
|
||||
+ != NULL && (tmp_end[1] == delim)) {
|
||||
+ tmp_end = (char *) &tmp_end[2];
|
||||
+ }
|
||||
|
||||
- /* Reset var options to point to next element */
|
||||
- if (tmp_end) {
|
||||
- tmp_end[0] = '\0';
|
||||
- options = (char *) &tmp_end[1];
|
||||
- } else
|
||||
- /* Reached the end of the mount option string */
|
||||
- options = end;
|
||||
+ /* Reset var options to point to next element */
|
||||
+ if (tmp_end) {
|
||||
+ tmp_end[0] = '\0';
|
||||
+ options = (char *) &tmp_end[1];
|
||||
+ } else
|
||||
+ /* Reached the end of the mount option
|
||||
+ * string */
|
||||
+ options = end;
|
||||
+ }
|
||||
|
||||
/* Now build new password string */
|
||||
temp_len = strlen(value);
|
||||
--
|
||||
1.7.0.4
|
||||
|
18
kernel.spec
18
kernel.spec
|
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||
# For non-released -rc kernels, this will be appended after the rcX and
|
||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||
#
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
|
@ -772,6 +772,12 @@ Patch22024: iwlwifi-dont-mess-up-the-SCD-when-removing-a-key.patch
|
|||
Patch22030: SUNRPC-new-svc_bind-routine-introduced.patch
|
||||
Patch22031: SUNRPC-move-per-net-operations-from-svc_destroy.patch
|
||||
|
||||
#rhbz 832741
|
||||
Patch22032: cifs-fix-parsing-of-password-mount-option.patch
|
||||
|
||||
#rhbz 832188
|
||||
Patch22033: udl-bind-fix.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
@ -1430,6 +1436,12 @@ ApplyPatch iwlwifi-dont-mess-up-the-SCD-when-removing-a-key.patch
|
|||
ApplyPatch SUNRPC-new-svc_bind-routine-introduced.patch
|
||||
ApplyPatch SUNRPC-move-per-net-operations-from-svc_destroy.patch
|
||||
|
||||
#rhbz 832741
|
||||
ApplyPatch cifs-fix-parsing-of-password-mount-option.patch
|
||||
|
||||
#rhbz 832188
|
||||
ApplyPatch udl-bind-fix.patch
|
||||
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
%endif
|
||||
|
@ -2168,6 +2180,10 @@ fi
|
|||
# and build.
|
||||
|
||||
%changelog
|
||||
* Mon Jun 18 2012 Josh Boyer <jwboyer@redhat.com>
|
||||
- Add patch to fix CIFS password mount option parsing (rhbz 832741)
|
||||
- Add patch to fix udl device binding (rhbz 832188)
|
||||
|
||||
* Thu Jun 14 2012 Justin M. Forbes <jforbes@redhat.com> 3.4.2-1
|
||||
- Linux 3.4.2
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
@@ -, +, @@
|
||||
drivers/gpu/drm/udl/udl_drv.c | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
--- a/drivers/gpu/drm/udl/udl_drv.c
|
||||
+++ a/drivers/gpu/drm/udl/udl_drv.c
|
||||
@@ -13,8 +13,21 @@
|
||||
|
||||
static struct drm_driver driver;
|
||||
|
||||
+/*
|
||||
+ * There are many DisplayLink-based graphics products, all with unique PIDs.
|
||||
+ * So we match on DisplayLink's VID + Vendor-Defined Interface Class (0xff)
|
||||
+ * We also require a match on SubClass (0x00) and Protocol (0x00),
|
||||
+ * which is compatible with all known USB 2.0 era graphics chips and firmware,
|
||||
+ * but allows DisplayLink to increment those for any future incompatible chips
|
||||
+ */
|
||||
static struct usb_device_id id_table[] = {
|
||||
- {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,},
|
||||
+ {.idVendor = 0x17e9, .bInterfaceClass = 0xff,
|
||||
+ .bInterfaceSubClass = 0x00,
|
||||
+ .bInterfaceProtocol = 0x00,
|
||||
+ .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
|
||||
+ USB_DEVICE_ID_MATCH_INT_CLASS |
|
||||
+ USB_DEVICE_ID_MATCH_INT_SUBCLASS |
|
||||
+ USB_DEVICE_ID_MATCH_INT_PROTOCOL,},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, id_table);
|
Loading…
Reference in New Issue