From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#29225: Tramp backup-by-copying in a Converting ACL Invalid argument error on Windows 7 Date: Fri, 10 Nov 2017 15:39:39 +0100 Message-ID: <874lq2kxjo.fsf@gmx.de> References: <83lgjfqsjt.fsf@gnu.org> <87bmkal31b.fsf@gmx.de> <83mv3up9jq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1510324818 27575 195.159.176.226 (10 Nov 2017 14:40:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Nov 2017 14:40:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: shuguang@gmail.com, 29225@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 10 15:40:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDATZ-0006tF-FD for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Nov 2017 15:40:09 +0100 Original-Received: from localhost ([::1]:42089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDATg-0000E1-NR for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Nov 2017 09:40:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDATW-0000BV-7d for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 09:40:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDATS-0007v3-7n for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 09:40:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDATS-0007uY-4Q for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 09:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eDATR-00039m-O1 for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 09:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Nov 2017 14:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29225-submit@debbugs.gnu.org id=B29225.151032479012110 (code B ref 29225); Fri, 10 Nov 2017 14:40:01 +0000 Original-Received: (at 29225) by debbugs.gnu.org; 10 Nov 2017 14:39:50 +0000 Original-Received: from localhost ([127.0.0.1]:33388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDATF-00039G-Oo for submit@debbugs.gnu.org; Fri, 10 Nov 2017 09:39:49 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:56138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDATE-000393-KL for 29225@debbugs.gnu.org; Fri, 10 Nov 2017 09:39:49 -0500 Original-Received: from detlef.gmx.de ([79.140.124.106]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAQ0o-1eOfiR0T2w-00BZON; Fri, 10 Nov 2017 15:39:41 +0100 In-Reply-To: <83mv3up9jq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Nov 2017 15:06:49 +0200") X-Provags-ID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LFy9Y5icvtP5xD7mXiuzG6IU X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139733 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: Hi Eli, > I think it should return nil when acl_errno_valid returns false, and > otherwise signal an error. It currently calls acl_errno_valid in one > of the two places where error could happen, but not in the other. And > the doc string should be amended to say that. WDYT? Seems to work, yes. acl_from_text returns EINVAL for wrong ACLs, so the error would be suppressed, because acl_errno_valid returns false this case. I've tested successfully the appended patch on GNU/Linux. (set-file-acl "/tmp/123" "dummy") returns nil with the applied patch, and (file-error "Converting ACL" "Invalid argument" "/tmp/123") w/o the patch. I cannot test on MS Windows. I don't know whether we must extend the docstring. Summarizing probable errors is not the default in Emacs docstrings. And the docstring does not promise, that no error at all will happen. If you don't object, I'll commit the patch to emacs-26. Plus minor changes in Tramp. Maybe I'll find also the time next days, to add the missing tests for file-acl and set-file-acl in tramp-tests.el. See the TODO list at the end of that file. Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment diff --git a/src/fileio.c b/src/fileio.c index cc1399e1bd..f538f12f9b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3047,7 +3047,7 @@ support. */) if (STRINGP (acl_string)) { acl = acl_from_text (SSDATA (acl_string)); - if (acl == NULL) + if (acl == NULL && acl_errno_valid (errno)) { report_file_error ("Converting ACL", absname); return Qnil; --=-=-=--