Bug 10682 - retrying the mount with uppercased hostname, sharename and prefix doesn't work anymore (e.g. during OS/2 mounts)
retrying the mount with uppercased hostname, sharename and prefix doesn't wor...
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
All All
: P5 normal
: ---
Assigned To: Jeff Layton
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-01 14:43 UTC by Guenter Kukkukk
Modified: 2014-10-19 00:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guenter Kukkukk 2014-07-01 14:43:24 UTC
since (kernel module) commit:
http://git.samba.org/?p=sfrench/cifs-2.6.git;a=commitdiff;h=73a999fab313053ceebffa9293fadf5a306a58e8

the unc, target and prefixpath mount options are no longer used.

In mount.cifs.c, when getting errno=ENXIO, the mount is retried by uppercasing
hostname, sharename and prefixpath in the "unc=..." mount option, which
is ignored now in the kernel.
This leads to a permanent failure e.g. during mounting an OS/2 share, see thread
https://lists.samba.org/archive/samba/2014-June/182107.html

Fix this by also uppercasing the now used "orig_dev":

diff --git a/mount.cifs.c b/mount.cifs.c
index 497665d..3535096 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -2097,7 +2097,8 @@ mount_retry:
                        if (!already_uppercased &&
                            uppercase_string(parsed_info->host) &&
                            uppercase_string(parsed_info->share) &&
-                           uppercase_string(parsed_info->prefix)) {
+                           uppercase_string(parsed_info->prefix) &&
+                           uppercase_string(orig_dev)) {
                                fprintf(stderr,
                                        "Retrying with upper case share name\n");
                                already_uppercased = 1;

Signed-off-by: Guenter Kukkukk <kukks@samba.org>

Cheers, Günter
Comment 1 Jeff Layton 2014-07-01 14:47:48 UTC
Well spotted. Looks like a straightforward fix. Guenter, do you mind sending the patch to me via email and cc'ing the mailing list with a proper signed-off-by line, etc? I'll plan to merge it in a few days, assuming that no one objects.
Comment 2 Steve French 2014-10-19 00:26:23 UTC
This is in cifs-utils (version 6.4 and later). Should be fixed now

http://git.samba.org/?p=cifs-utils.git;a=commit;h=43fd65ba0fca85a86a79e84bb2bc42b531d858e6