unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27009: 25.1; Tramp stuck on wrong host
@ 2017-05-21 10:12 Devon Sean McCullough
  2017-05-22 12:03 ` Michael Albinus
  0 siblings, 1 reply; 8+ messages in thread
From: Devon Sean McCullough @ 2017-05-21 10:12 UTC (permalink / raw)
  To: 27009

Tramp connects to the wrong host -- the user may not notice, leading to
devastating damage.

To replicate this bug, have two different systems serve SSH on different
ports of the same IP address,
e.g., In VBox, map local host ports 11111 and 22222 respectively to two
different guest systems:
VirtualBox VM > Devices > Network > Network Settings ... > Adapter 1 >
  Attached to: NAT
  Advanced > Port Forwarding >
    Host Port: 11111 for system one, 22222 for system two
    Guest Port: 22

bash$ Open -n -a /Applications/Emacs.app --args -Q --eval '
(message "Emacs %s tramp bug %s" ; t = bug, nil = ok
	 emacs-version
	 (let ((one "/scp:127.0.0.1#11111:")
	       (two "/scp:127.0.0.1#22222:"))
	   (delete-other-windows)
	   (dired one)
	   (revert-buffer)
	   (split-window)
	   (other-window 1)
	   (dired two)
	   (revert-buffer)
	   (apply (function string=)
		  (mapcar (lambda (w)
			    (with-current-buffer (window-buffer w)
			      (buffer-substring (save-excursion
						  (goto-char (point-min))
						  (forward-line 1)
						  (point))
						(point-max))))
			  (window-list-1)))))'

		Peace
			--Devon

P.S. (tramp-cleanup-all-connections) ; fails to fix it but can switch
which host is wrong.

In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version
10.9.5 (Build 13F1911))
 of 2016-09-21 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Tramp: Opening connection for 127.0.0.1#11111 using scp...
Tramp: Sending command ‘exec ssh  -p 11111 -o ControlMaster=auto -o
ControlPath='tramp.%C' -o ControlPersist=no -e none 127.0.0.1’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘127.0.0.1’
Tramp: Opening connection for 127.0.0.1#11111 using scp...done
ls does not support --dired; see ‘dired-use-ls-dired’ for more details.
Emacs 25.1.1 tramp bug t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
tramp-cache tramp-sh tramp tramp-compat auth-source cl-seq eieio
byte-opt bytecomp byte-compile cl-extra cconv eieio-core cl-macs gv
gnus-util mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib
mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint
ansi-color ring format-spec advice dired time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 216764 9018)
 (symbols 48 22062 0)
 (miscs 40 59 298)
 (strings 32 24033 6626)
 (string-bytes 1 768617)
 (vectors 16 36983)
 (vector-slots 8 706708 7377)
 (floats 8 283 52)
 (intervals 56 539 0)
 (buffers 976 20))






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-14 13:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-21 10:12 bug#27009: 25.1; Tramp stuck on wrong host Devon Sean McCullough
2017-05-22 12:03 ` Michael Albinus
     [not found]   ` <0BE42352-D06B-4466-A898-5B3EF5436428@csail.mit.edu>
     [not found]     ` <87a864uiba.fsf@detlef>
2017-05-24 14:28       ` Michael Albinus
2017-05-24 17:22         ` Glenn Morris
2017-05-24 20:31           ` Michael Albinus
2017-06-07 12:41             ` Devon Sean McCullough
2017-06-07 14:26               ` Michael Albinus
2017-07-14 13:19                 ` Michael Albinus

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).