Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 283221 Details for
Bug 417961
Update CIFS for RHEL5.2
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch 13 -- when mount helper missing fix slash wrong direction in share
0013-BZ-417961-CIFS-when-mount-helper-missing-fix-slas.patch (text/plain), 2.70 KB, created by
Jeff Layton
on 2007-12-10 20:23:40 UTC
(
hide
)
Description:
patch 13 -- when mount helper missing fix slash wrong direction in share
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-12-10 20:23:40 UTC
Size:
2.70 KB
patch
obsolete
>From 106e7fd59349c34d76893890072032a0350be1eb Mon Sep 17 00:00:00 2001 >From: Steve French <sfrench@us.ibm.com> >Date: Thu, 1 Nov 2007 02:12:10 +0000 >Subject: [RHEL5.2 PATCH 13/16] BZ#417961: [CIFS] when mount helper missing fix slash wrong direction in share > >Kernel bugzilla bug #9228 > >If mount helper (mount.cifs) missing, mounts with form like >//10.11.12.13/c$ would not work (only mounts with slash e.g. >//10.11.12.13\\c$ would work) due to problem with slash supposed >to be converted to backslash by the mount helper (which is not >there). > >If we fail on converting an IPv4 address in in4_pton then >try to canonicalize the first slash (ie between sharename >and host ip address) if necessary. If we have to retry >to check for IPv6 address the slash is already converted >if necessary. > >Signed-off-by: Steve French <sfrench@us.ibm.com> >--- > fs/cifs/netmisc.c | 40 +++++++++++++++++++++++++++++++++++----- > 1 files changed, 35 insertions(+), 5 deletions(-) > >diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c >index d5872bb..173ed1c 100644 >--- a/fs/cifs/netmisc.c >+++ b/fs/cifs/netmisc.c >@@ -132,6 +132,34 @@ static const struct smb_to_posix_error mapping_table_ERRHRD[] = { > {0, 0} > }; > >+ >+/* if the mount helper is missing we need to reverse the 1st slash >+ from '/' to backslash in order to format the UNC properly for >+ ip address parsing and for tree connect (unless the user >+ remembered to put the UNC name in properly). Fortunately we do >+ not have to call this twice (we check for IPv4 addresses >+ first, so it is already converted by the time we >+ try IPv6 addresses */ >+static int canonicalize_unc(char *cp) >+{ >+ int i; >+ >+ for (i = 0; i <= 46 /* INET6_ADDRSTRLEN */ ; i++) { >+ if (cp[i] == 0) >+ break; >+ if (cp[i] == '\\') >+ break; >+ if (cp[i] == '/') { >+#ifdef CONFIG_CIFS_DEBUG2 >+ cFYI(1, ("change slash to backslash in malformed UNC")); >+#endif >+ cp[i] = '\\'; >+ return 1; >+ } >+ } >+ return 0; >+} >+ > /* Convert string containing dotted ip address to binary form */ > /* returns 0 if invalid address */ > >@@ -142,11 +170,13 @@ cifs_inet_pton(int address_family, char *cp, void *dst) > int ret = 0; > > /* calculate length by finding first slash or NULL */ >- /* BB Should we convert '/' slash to '\' here since it seems already >- * done before this */ >- if ( address_family == AF_INET ) { >- ret = in4_pton(cp, -1 /* len */, dst , '\\', NULL); >- } else if ( address_family == AF_INET6 ) { >+ if (address_family == AF_INET) { >+ ret = in4_pton(cp, -1 /* len */, dst, '\\', NULL); >+ if (ret == 0) { >+ if (canonicalize_unc(cp)) >+ ret = in4_pton(cp, -1, dst, '\\', NULL); >+ } >+ } else if (address_family == AF_INET6) { > ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); > } > #ifdef CONFIG_CIFS_DEBUG2 >-- >1.5.3.3 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 417961
:
283091
|
283101
|
283111
|
283121
|
283131
|
283141
|
283151
|
283161
|
283171
|
283181
|
283191
|
283201
|
283211
| 283221 |
283231
|
283241
|
283251