From: Michael Albinus <michael.albinus@gmx.de>
To: "Trent W. Buck" <trentbuck@gmail.com>
Cc: emacs-pretest-bug@gnu.org, rfrancoise@debian.org
Subject: Re: Tramp 2.0 -> 2.1 migration woes
Date: Sun, 27 Jan 2008 15:57:49 +0100 [thread overview]
Message-ID: <87myqrfh8y.fsf@gmx.de> (raw)
In-Reply-To: <20080127040051.GA16241@Clio.twb.ath.cx> (Trent W. Buck's message of "Sun, 27 Jan 2008 15:00:53 +1100")
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
"Trent W. Buck" <trentbuck@gmail.com> writes:
> The initial hops are no longer shown in the path, nor on the first
> line of dired buffers. Already I have been VERY confused because
> a bad tramp-default-proxies-alist resulted in no proxy being used for
>
> /sudo:root@leek:/etc
>
> ...so that instead of editing leek's /etc as root, I was editing my
> laptop's /etc as root! Since the path claims that I'm on root@leek, I
> would have made disastrous changes to my local system if I hadn't
> noticed that there was no /etc/ssh/sshd_config (because sshd is not
> installed on my laptop).
The appended patch shall fix it. Could you, please, test?
Best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1163 bytes --]
*** /home/albinus/src/tramp/lisp/tramp.el.~2.624.~ 2008-01-26 15:19:11.000000000 +0100
--- /home/albinus/src/tramp/lisp/tramp.el 2008-01-27 15:43:19.000000000 +0100
***************
*** 6052,6057 ****
--- 6052,6078 ----
"Method `%s' is not supported for multi-hops."
(tramp-file-name-method item)))))
+ ;; In case the host name is not used for the remote shell
+ ;; command, the user could be misguided by applying a random
+ ;; hostname.
+ (let* ((v (car target-alist))
+ (method (tramp-file-name-method v))
+ (host (tramp-file-name-host v)))
+ (unless
+ (or
+ ;; There are multi-hops.
+ (cdr target-alist)
+ ;; The host name is used for the remote shell command.
+ (member
+ '("%h") (tramp-get-method-parameter method 'tramp-login-args))
+ ;; The host is local. We cannot use `tramp-local-host-p'
+ ;; here, because it opens a connection as well.
+ (string-match
+ (concat "^" (regexp-opt (list "localhost" (system-name)) t) "$")
+ host))
+ (tramp-error
+ v 'file-error "Wrong hostname `%s' for method `%s'" host method)))
+
;; Result.
target-alist))
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2008-01-27 14:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-27 4:00 Tramp 2.0 -> 2.1 migration woes Trent W. Buck
2008-01-27 13:42 ` Michael Albinus
2008-01-28 2:13 ` Trent W. Buck
2008-01-28 15:32 ` Michael Albinus
2008-01-28 15:57 ` Trent W. Buck
2008-01-28 16:31 ` Michael Albinus
2008-01-29 0:34 ` Trent W. Buck
2008-01-31 11:00 ` Michael Albinus
2008-01-31 14:51 ` Stefan Monnier
2008-01-31 15:46 ` Michael Albinus
2008-01-27 14:57 ` Michael Albinus [this message]
2008-01-28 2:30 ` Trent W. Buck
2008-01-28 14:50 ` Host name for su(do)? (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus
2008-01-28 15:46 ` Trent W. Buck
2008-01-28 16:10 ` Host name for su(do)? Michael Albinus
2008-01-28 21:47 ` Michael Albinus
2008-01-28 20:54 ` Shell-command is no longer a shell (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus
2008-01-29 0:43 ` Trent W. Buck
2008-01-29 21:06 ` Shell-command is no longer a shell Michael Albinus
2008-01-31 2:09 ` Trent W. Buck
2008-01-29 20:58 ` sudo -s -H (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87myqrfh8y.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-pretest-bug@gnu.org \
--cc=rfrancoise@debian.org \
--cc=trentbuck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).