Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 329362 Details for
Bug 442552
>sys-kernel/gentoo-sources-3.3.8 - CIFS VFS: cifs_mount failed w/return code = -22
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Later patch that is supposed to fix this, but doesn't.
file_442552.txt (text/plain), 3.08 KB, created by
Tom Wijsman (TomWij) (RETIRED)
on 2012-11-12 18:21:35 UTC
(
hide
)
Description:
Later patch that is supposed to fix this, but doesn't.
Filename:
MIME Type:
Creator:
Tom Wijsman (TomWij) (RETIRED)
Created:
2012-11-12 18:21:35 UTC
Size:
3.08 KB
patch
obsolete
>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: cifs: fix parsing of password mount option > >From: Suresh Jayaraman <sjayaraman@suse.com> > >commit e73f843a3235a19de38359c91586e9eadef12238 upstream. > >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> >Signed-off-by: Steve French <sfrench@us.ibm.com> >Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > >--- > fs/cifs/connect.c | 32 +++++++++++++++++--------------- > 1 file changed, 17 insertions(+), 15 deletions(-) > >--- a/fs/cifs/connect.c >+++ b/fs/cifs/connect.c >@@ -1585,24 +1585,26 @@ cifs_parse_mount_options(const char *mou > * 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 442552
:
329066
|
329068
|
329300
|
329360
| 329362