From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#55855: "Invalid file name" error with tramp-smb filename check Date: Thu, 09 Jun 2022 14:51:00 +0200 Message-ID: <875ylahuff.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32089"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 55855@debbugs.gnu.org To: Evan MacTaggart Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 16:32:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzJCj-00089k-Cv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 16:32:09 +0200 Original-Received: from localhost ([::1]:33380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzJCi-0002uX-3R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 10:32:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzHdq-0004QP-QA for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 08:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzHdp-0003Za-Ry for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzHdp-0001s2-Q7 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 08:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 12:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55855 X-GNU-PR-Package: emacs Original-Received: via spool by 55855-submit@debbugs.gnu.org id=B55855.16547790717128 (code B ref 55855); Thu, 09 Jun 2022 12:52:01 +0000 Original-Received: (at 55855) by debbugs.gnu.org; 9 Jun 2022 12:51:11 +0000 Original-Received: from localhost ([127.0.0.1]:45346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzHd0-0001qu-LP for submit@debbugs.gnu.org; Thu, 09 Jun 2022 08:51:10 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:54143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzHcz-0001qf-9v for 55855@debbugs.gnu.org; Thu, 09 Jun 2022 08:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1654779062; bh=hyG/hcPv05dmMdWxngmxUgkpNexmIFukxiembA8RWuc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=XvrJcfwOMx1Ih0uQ1A0X5qLGicBxe/AWlBpjnpBS51kJeHWCrz5a1bOfZ5lgXeRh2 pOckFbVpSNEExSQnbKaqoIGncIN/PB/C6GUpmupz1w31mOhetLukAOXM4NboBLU+vu Dp190lASOgLPeN7h8+n1D7HdMEqicYCk4j+jJoe4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.151.112]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MyKHc-1npBKD3YYm-00ylKS; Thu, 09 Jun 2022 14:51:01 +0200 In-Reply-To: (Evan MacTaggart's message of "Wed, 8 Jun 2022 11:55:21 -0600") X-Provags-ID: V03:K1:VcC6aB+MNjVuMKOdzMSxwk+AyR145KmF8CO6Mum4iPHQxpeyy3R uC4udsGa+AqxCLR+ikqbaWMrSlaD5SJKNRtVHYegDcKHqAHloyY2HHlt80ECKYtHIfJ2FEY Q4OZYfwtV+1TG0h5mhjT6ehZBJGngcP6dBO70mBQUrKZwNUomfUCQNFk0ZFmiVFrVrMKAmE aGtHvCy6lYx0g7J72ApuQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:YoVzohoic9Y=:uZ7S26Kc9NtvJ4GK9yVRcc 6AO5cLb9Nn6fbag8CeXjlB8BBsFDDZjV5R+S3LAb/NDfXYN9L3p4TIrgz8rmLKQc0Etdjup1e ywTpNN3t9wn0ili6G7rhTxayBAMr3ujeGMDfYhDasHdvNJomHCGSdqiJWyhBjJq9jXA4s0jkx 7KHnJkkvfQ4MKM4q7xUukVuuB81WHF6UExTHD7wYjAeheaVD8JeboYJrTSHvP7+z67mU2/Vm8 mkZ23GFo2AXPrnqi/I+hg1XofNesFH6Gv6zKVImjoc32OA1kgUbcFG/VVRSB1dwjeNUV6D2do jUOEIiiV09k3xTmPnE2aGCX3MUlTSFQofOMbUFbtzyUVCCaIE54/+Tqo8yoFT5sJYq0XMnDhk nSC8oIG6kWS5IGXMBhOrj/tJjBj7FTVTR1FtlhT74TZsxwy2Re5ugZ5o7qmc5x54dhZ+Rj9J0 vwaRppUizQsrOyObgM7s6U6T+gxBQpaBxiejTqoMjLedLDiSGbbAilJg/HjMU+dKzFuHFcL7e tSqapP1QO4OxCKzVF1UkWEQHq2Yd98qxeIIS2niWJAAABzo0tI+zGeW0Ss6moSViqiierCMCo /DN/f99VVQyky7DmKo9tH/8gk8hUoWvqV0xPSz4Hfa7OohuMPb+EqLRH5XtD+hPAI3JG3m5hK J/j/AU5zSb5/EKS2SeoKBq1Ob3mWOTK1NZyZQqtpcqJy+Flh8tkjitzteITD/Zz6I5OBuEc0w aj7o25BkUmGyNqj1FDqoTtunSoEoSEc4LVC7eNepWFSMvdM22Kscg33Q+HkqdK7nydYHiC1q X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234074 Archived-At: Evan MacTaggart writes: Hi Evan, > So after tramping into an SMB file server, I'm trying to find-file > into a directory whose name is as so: "/smb:username%DOMAIN@fsname:/my > path/1234. Some Name". The problem with this filename is that the > filename contains a ". ", which throws a tramp-error. And as per the > code comment is "not supported", however it seems as though, at least > for the server I'm connected to, this is supported. Thanks for the report and the analysis! > I'm certainly not the most well versed on the samba protocol, but > perhaps look into this and see if the once invalid file names are now > valid. Or perhaps describe specifically what is not supported about > this filename. I'd imagine/assume this is due to a newer SMB version > than what the following code was initially written for. I've digged into this, and you are right: There is no SMB protocol problem. There is an error in tramp-smb-handle-write-region, which didn't quote tmpfile when sending "put ...". Since it wasn't detected earlier, it was regarded as problem of SMB, resulting in the wrong check. I've fixed this now, and I've also adapted the check in tramp-smb-get-localname. Pushed to the emacs-28 git branch. Will appear with Emacs 28.2 as well as with the next GNU ELPA Tramp release (2.5.3 or 2.6.0, not decided yet). > Thanks in advance, and let me know if there's anything else you need > from me. You could test with the emacs-28 git branch. For the master branch, I haven't pushed a fix yet, because I'd like to rework it for being more robust. If you don't use a git clone, you can consult the patch at . Does it work for you as well? > Cheers, > Evan MacTaggart Best regards, Michael.