[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114834: Tweak Tramp method definition syntax to all
From: |
Daniel Colascione |
Subject: |
[Emacs-diffs] trunk r114834: Tweak Tramp method definition syntax to allow overriding check for localhost-only methods |
Date: |
Tue, 29 Oct 2013 02:50:57 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114834
revision-id: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Mon 2013-10-28 19:50:24 -0700
message:
Tweak Tramp method definition syntax to allow overriding check for
localhost-only methods
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
lisp/net/tramp.el tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-28 19:30:40 +0000
+++ b/lisp/ChangeLog 2013-10-29 02:50:24 +0000
@@ -1,3 +1,10 @@
+2013-10-29 Daniel Colascione <address@hidden>
+
+ * net/tramp.el (tramp-methods): Document new functionality.
+ * net/tramp-sh.el (tramp-compute-multi-hops): Punt to
+ tramp-hostname-checker if method provides one instead of scanning
+ argument list for "%h" to decide hostname acceptability.
+
2013-10-28 Michael Albinus <address@hidden>
* net/tramp-sh.el (tramp-sh-handle-copy-directory):
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-10-28 19:30:40 +0000
+++ b/lisp/net/tramp-sh.el 2013-10-29 02:50:24 +0000
@@ -4285,6 +4285,10 @@
(or
;; There are multi-hops.
(cdr target-alist)
+ ;; This method explicitly has an explicit allowability check.
+ (let ((checker (tramp-get-method-parameter
+ method 'tramp-hostname-checker)))
+ (when checker (funcall checker v host method) t))
;; The host name is used for the remote shell command.
(member
'("%h") (tramp-get-method-parameter method 'tramp-login-args))
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-10-17 19:39:22 +0000
+++ b/lisp/net/tramp.el 2013-10-29 02:50:24 +0000
@@ -265,6 +265,15 @@
In general, the global default value shall be used, but for
some methods, like \"su\" or \"sudo\", a shorter timeout
might be desirable.
+ * `tramp-hostname-checker'
+ This is a function that tramp calls while setting
+ up a connection. It is called with three arguments:
+ the target, the host, and the method description. If
+ the hostname is unacceptable, this function should signal
+ using `tramp-error'. If a method does not provide
+ a value here, then Tramp looks at whether the method's
+ login program uses a \"%h\" parameter. If not, then Tramp
+ requires that the given hostname match `tramp-local-host-regexp'.
What does all this mean? Well, you should specify `tramp-login-program'
for all methods; this program is used to log in to the remote site. Then,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114834: Tweak Tramp method definition syntax to allow overriding check for localhost-only methods,
Daniel Colascione <=