From patchwork Tue Jun 10 23:38:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?R8ODwrxudGVyIEt1a2t1a2s=?= X-Patchwork-Id: 4332901 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B5D749F333 for ; Tue, 10 Jun 2014 23:38:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3C5D201EC for ; Tue, 10 Jun 2014 23:38:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C34B8201DE for ; Tue, 10 Jun 2014 23:38:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbaFJXiM (ORCPT ); Tue, 10 Jun 2014 19:38:12 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:61418 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183AbaFJXiM (ORCPT ); Tue, 10 Jun 2014 19:38:12 -0400 Received: from linux4771.addlz.kukkukk.com (91-64-206-36-dynip.superkabel.de [91.64.206.36]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0Lh6r1-1WNey51CAZ-00oV1a; Wed, 11 Jun 2014 01:38:10 +0200 Message-ID: <539796E1.3020602@kukkukk.com> Date: Wed, 11 Jun 2014 01:38:09 +0200 From: =?ISO-8859-15?Q?G=FCnter_Kukkukk?= Organization: =?ISO-8859-15?Q?Entwicklungsb=FCro_f=FCr_Informationste?= =?ISO-8859-15?Q?chnologien?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: linux-cifs@vger.kernel.org Subject: mount.cifs fails when the share name must be converted to uppercase - e.g. for OS/2 X-Provags-ID: V02:K0:7P8/XchgiDQiNN2Wiq5TW4teSLrWp+ivsrlxiVggpJA KWhr8MM0qm9n0vigSBS+q22Mfmfpdj0OPODWYL+2IoIkr35hR+ hLoD3pI+8Ao7dJ5wQd/+eHSm37x5Mk5jgIyjEG9RYJFXWmB0/x TQoClJPyXR8FDOI9rA5jTiAAc2Xq4BCt2uXMkEhlHTMgCgEPMs j09+KIe6csK8fPrLE/2D09SEAaEI0/T/RZN6teqchleYPcHnQO fUofOV3kbwFwKD/y6CZBja2MH41/ZEj/FboWYFsGbr3PyBTkmW GcIVCoFnEgBIGuIctPMiCJ/waCEmIBN64X7iM8TS0E0zN/i6f8 eagbrLDgc/6L87DtJ8VYv+foQV5go2Y6muiZKXlO1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 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 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;