diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 9 |
3 files changed, 20 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34ac8ffd5e5..f2d0d598c38 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-10-29 Daniel Colascione <dancol@dancol.org> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-methods): Document new functionality. | ||
| 4 | * net/tramp-sh.el (tramp-compute-multi-hops): Punt to | ||
| 5 | tramp-hostname-checker if method provides one instead of scanning | ||
| 6 | argument list for "%h" to decide hostname acceptability. | ||
| 7 | |||
| 1 | 2013-10-28 Michael Albinus <michael.albinus@gmx.de> | 8 | 2013-10-28 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 9 | ||
| 3 | * net/tramp-sh.el (tramp-sh-handle-copy-directory): | 10 | * net/tramp-sh.el (tramp-sh-handle-copy-directory): |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f69859ddb10..3ed2cd324e8 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4285,6 +4285,10 @@ Gateway hops are already opened." | |||
| 4285 | (or | 4285 | (or |
| 4286 | ;; There are multi-hops. | 4286 | ;; There are multi-hops. |
| 4287 | (cdr target-alist) | 4287 | (cdr target-alist) |
| 4288 | ;; This method explicitly has an explicit allowability check. | ||
| 4289 | (let ((checker (tramp-get-method-parameter | ||
| 4290 | method 'tramp-hostname-checker))) | ||
| 4291 | (when checker (funcall checker v host method) t)) | ||
| 4288 | ;; The host name is used for the remote shell command. | 4292 | ;; The host name is used for the remote shell command. |
| 4289 | (member | 4293 | (member |
| 4290 | '("%h") (tramp-get-method-parameter method 'tramp-login-args)) | 4294 | '("%h") (tramp-get-method-parameter method 'tramp-login-args)) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2cbaf4a1636..f076f043c5f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -265,6 +265,15 @@ pair of the form (KEY VALUE). The following KEYs are defined: | |||
| 265 | In general, the global default value shall be used, but for | 265 | In general, the global default value shall be used, but for |
| 266 | some methods, like \"su\" or \"sudo\", a shorter timeout | 266 | some methods, like \"su\" or \"sudo\", a shorter timeout |
| 267 | might be desirable. | 267 | might be desirable. |
| 268 | * `tramp-hostname-checker' | ||
| 269 | This is a function that tramp calls while setting | ||
| 270 | up a connection. It is called with three arguments: | ||
| 271 | the target, the host, and the method description. If | ||
| 272 | the hostname is unacceptable, this function should signal | ||
| 273 | using `tramp-error'. If a method does not provide | ||
| 274 | a value here, then Tramp looks at whether the method's | ||
| 275 | login program uses a \"%h\" parameter. If not, then Tramp | ||
| 276 | requires that the given hostname match `tramp-local-host-regexp'. | ||
| 268 | 277 | ||
| 269 | What does all this mean? Well, you should specify `tramp-login-program' | 278 | What does all this mean? Well, you should specify `tramp-login-program' |
| 270 | for all methods; this program is used to log in to the remote site. Then, | 279 | for all methods; this program is used to log in to the remote site. Then, |