mount.cifs fails when the share name must be converted to uppercase - e.g. for OS/2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As discussed in this thread
   https://lists.samba.org/archive/samba/2014-June/182107.html
recent mount.cifs does not allow mounting of OS/2 shares, when
the share name has not been specified in uppercase.

After the first failing mount attempt, mount.cifs then converts
  - host
  - share name
  - prefix
to uppercase and retries the mount.
This worked in former versions - but is failing now.

Using "strace" and looking at the source of mount.cifs.c
      rc = mount(orig_dev, ".", cifs_fstype, parsed_info->flags, options);
i noticed that the passed "orig_dev" parameter (e.g. //server/share) was
not converted to uppercase.

I also converted orig_dev to uppercase and it was working again:

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;


I'm not a mount expert and only had a short look at the source, but
probably this is the culprit.

Should i open a bug report for this?

Cheers, Günter
-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux