GNU bug report logs - #35241
27.0.50; Tramp can't decrypt .authinfo.gpg in Win 10

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang79 <at> qq.com>

Date: Fri, 12 Apr 2019 02:46:01 UTC

Severity: normal

Found in version 27.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 35241 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 35241 <at> debbugs.gnu.org, shuguang79 <at> qq.com, npostavs <at> gmail.com
Subject: Re: bug#35241: 27.0.50; Tramp can't decrypt .authinfo.gpg in Win 10
Date: Tue, 16 Apr 2019 18:20:24 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Michael Albinus <michael.albinus <at> gmx.de>
>> Date: Tue, 16 Apr 2019 14:50:40 +0200
>> Cc: 35241 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
>>
>> Relative file names are not forbidden as part of exec-path. Shall we ban
>> them (with an error message)? Or shall we ignore them, silently? Don't know.
>>
>> I'd vote for the latter (including proper documentation).
>
> Maybe executable-find should ignore them if default-directory is
> remote?

Or suppress file name handlers if the REMOTE arg is nil? Like

--8<---------------cut here---------------start------------->8---
*** /tmp/ediffaHi4iI	2019-04-16 18:15:36.467002896 +0200
--- /home/albinus/src/emacs/lisp/files.el	2019-04-16 18:15:25.698810831 +0200
***************
*** 1058,1064 ****
          (when (stringp res) (file-local-name res)))
      ;; Use 1 rather than file-executable-p to better match the
      ;; behavior of call-process.
!     (locate-file command exec-path exec-suffixes 1)))

  (defun load-library (library)
    "Load the Emacs Lisp library named LIBRARY.
--- 1058,1065 ----
          (when (stringp res) (file-local-name res)))
      ;; Use 1 rather than file-executable-p to better match the
      ;; behavior of call-process.
!     (let (file-name-handler)
!       (locate-file command exec-path exec-suffixes 1))))

  (defun load-library (library)
    "Load the Emacs Lisp library named LIBRARY.
--8<---------------cut here---------------end--------------->8---

Alternatively, we could just suppress Tramp:

--8<---------------cut here---------------start------------->8---
*** /tmp/ediffaHi4iI	2019-04-16 18:15:36.467002896 +0200
--- /home/albinus/src/emacs/lisp/files.el	2019-04-16 18:15:25.698810831 +0200
***************
*** 1058,1064 ****
          (when (stringp res) (file-local-name res)))
      ;; Use 1 rather than file-executable-p to better match the
      ;; behavior of call-process.
!     (locate-file command exec-path exec-suffixes 1)))

  (defun load-library (library)
    "Load the Emacs Lisp library named LIBRARY.
--- 1058,1065 ----
          (when (stringp res) (file-local-name res)))
      ;; Use 1 rather than file-executable-p to better match the
      ;; behavior of call-process.
!     (let (tramp-mode)
!       (locate-file command exec-path exec-suffixes 1))))

  (defun load-library (library)
    "Load the Emacs Lisp library named LIBRARY.
--8<---------------cut here---------------end--------------->8---

But in this case, other remote default directories would do the same
harm. Think about `url-handler-mode', for example.

Best regards, Michael.




This bug report was last modified 6 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.