aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog28
-rw-r--r--lisp/net/tramp.el274
2 files changed, 61 insertions, 241 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8ae2be957ac..7f7e86f114f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,31 @@
12002-09-02 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
2
3 * net/tramp.el: Version 2.0.15 released.
4 (require 'base64): Most modern Emacsen have the base64
5 encode/decode functions built in, so test to see if they are bound
6 before we go blindly requiring base64.el. From Steve Youngs
7 <youngs@xemacs.org>.
8 (tramp-feature-write-region-fix): XEmacs doesn't have a
9 'find-operation-coding-system' and this variable doesn't seem to
10 be used anywhere so wrap it in (unless (featurep 'xemacs)). From
11 Steve Youngs <youngs@xemacs.org>.
12 (tramp-methods): Remove duplicate definition of ssh1-old and
13 ssh2-old.
14 (tramp-open-connection-su): Use user name "root" if no user name
15 is given.
16
17 From Michael Albinus <Michael.Albinus@alcatel.de>:
18 * net/tramp.el (tramp-invoke-ange-ftp):
19 (tramp-ange-ftp-file-name-p): Check for Xemacs.
20 (tramp-do-copy-or-rename-file): Don't pass KEEP-DATE to
21 tramp-invoke-ange-ftp 'rename.
22 (tramp-handle-write-region): Don't pass LOCKNAME and CONFIRM to
23 tramp-invoke-ange-ftp 'write-region.
24 (tramp-handle-set-file-modes): Change order of FILENAME and MODE
25 passing to tramp-invoke-ange-ftp 'set-file-modes.
26 (tramp-invoke-ange-ftp): `tramp-disable-ange-ftp' must be called
27 again after activating `ange-ftp'.
28
12002-09-02 Kim F. Storm <storm@cua.dk> 292002-09-02 Kim F. Storm <storm@cua.dk>
2 30
3 * ido.el (ido-ignore-item-temp-list): New variable. 31 * ido.el (ido-ignore-item-temp-list): New variable.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 700681415e9..fb94491ae0c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,4 +1,4 @@
1;;; tramp.el --- Transparent Remote Access, Multiple Protocol -*- coding: iso-8859-1; -*- 1;;; tramp.el --- Transparent Remote Access, Multiple Protocol -*- coding: iso-8859-1; -*-
2 2
3;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
4 4
@@ -72,7 +72,7 @@
72;; In the Tramp CVS repository, the version numer is auto-frobbed from 72;; In the Tramp CVS repository, the version numer is auto-frobbed from
73;; the Makefile, so you should edit the top-level Makefile to change 73;; the Makefile, so you should edit the top-level Makefile to change
74;; the version number. 74;; the version number.
75(defconst tramp-version "2.0.14" 75(defconst tramp-version "2.0.15"
76 "This version of tramp.") 76 "This version of tramp.")
77 77
78(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" 78(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
@@ -80,7 +80,12 @@
80 80
81(require 'timer) 81(require 'timer)
82(require 'format-spec) ;from Gnus 5.8, also in tar ball 82(require 'format-spec) ;from Gnus 5.8, also in tar ball
83(require 'base64) ;for the mimencode methods 83;; The explicit check is not necessary in Emacs, which provides the
84;; feature even if implemented in C, but it appears to be necessary
85;; in XEmacs.
86(unless (and (fboundp 'base64-encode-region)
87 (fboundp 'base64-decode-region))
88 (require 'base64)) ;for the mimencode methods
84(require 'shell) 89(require 'shell)
85(require 'advice) 90(require 'advice)
86 91
@@ -317,30 +322,6 @@ This variable defaults to CMD.EXE on Windows NT, and to the value of
317 (tramp-su-args nil) 322 (tramp-su-args nil)
318 (tramp-telnet-program nil) 323 (tramp-telnet-program nil)
319 (tramp-telnet-args nil)) 324 (tramp-telnet-args nil))
320 ("ssh1-old"
321 (tramp-connection-function tramp-open-connection-rsh)
322 (tramp-rsh-program "ssh1")
323 (tramp-rcp-program nil)
324 (tramp-remote-sh "/bin/sh")
325 (tramp-rsh-args ("-e" "none"))
326 (tramp-rcp-args nil)
327 (tramp-rcp-keep-date-arg nil)
328 (tramp-su-program nil)
329 (tramp-su-args nil)
330 (tramp-telnet-program nil)
331 (tramp-telnet-args nil))
332 ("ssh2-old"
333 (tramp-connection-function tramp-open-connection-rsh)
334 (tramp-rsh-program "ssh2")
335 (tramp-rcp-program nil)
336 (tramp-remote-sh "/bin/sh")
337 (tramp-rsh-args ("-e" "none"))
338 (tramp-rcp-args nil)
339 (tramp-rcp-keep-date-arg nil)
340 (tramp-su-program nil)
341 (tramp-su-args nil)
342 (tramp-telnet-program nil)
343 (tramp-telnet-args nil))
344 ("telnet" 325 ("telnet"
345 (tramp-connection-function tramp-open-connection-telnet) 326 (tramp-connection-function tramp-open-connection-telnet)
346 (tramp-rsh-program nil) 327 (tramp-rsh-program nil)
@@ -1414,10 +1395,13 @@ This is used to map a mode number to a permission string.")
1414This variable is buffer-local in every buffer.") 1395This variable is buffer-local in every buffer.")
1415(make-variable-buffer-local 'tramp-last-cmd-time) 1396(make-variable-buffer-local 'tramp-last-cmd-time)
1416 1397
1398;; This variable does not have the right value in XEmacs. What should
1399;; I use instead of find-operation-coding-system in XEmacs?
1417(defvar tramp-feature-write-region-fix 1400(defvar tramp-feature-write-region-fix
1418 (let ((file-coding-system-alist '(("test" emacs-mule)))) 1401 (unless (featurep 'xemacs)
1419 (find-operation-coding-system 'write-region 0 0 "" nil "test")) 1402 (let ((file-coding-system-alist '(("test" emacs-mule))))
1420 "Internal variable to say if `write-region' chooses the right coding. 1403 (find-operation-coding-system 'write-region 0 0 "" nil "test")))
1404 "Internal variable to say if `write-region' chooses the right coding.
1421Older versions of Emacs chose the coding system for `write-region' based 1405Older versions of Emacs chose the coding system for `write-region' based
1422on the FILENAME argument, even if VISIT was a string.") 1406on the FILENAME argument, even if VISIT was a string.")
1423 1407
@@ -1975,7 +1959,7 @@ if the remote host can't provide the modtime."
1975 "Like `set-file-modes' for tramp files." 1959 "Like `set-file-modes' for tramp files."
1976 (with-parsed-tramp-file-name filename nil 1960 (with-parsed-tramp-file-name filename nil
1977 (when (tramp-ange-ftp-file-name-p multi-method method) 1961 (when (tramp-ange-ftp-file-name-p multi-method method)
1978 (tramp-invoke-ange-ftp 'set-file-modes filename mode)) 1962 (tramp-invoke-ange-ftp 'set-file-modes mode filename))
1979 (save-excursion 1963 (save-excursion
1980 (unless (zerop (tramp-send-command-and-check 1964 (unless (zerop (tramp-send-command-and-check
1981 multi-method method user host 1965 multi-method method user host
@@ -2374,9 +2358,11 @@ and `rename'. FILENAME and NEWNAME must be absolute file names."
2374 ;; Possibly invoke Ange-FTP. 2358 ;; Possibly invoke Ange-FTP.
2375 (when (and (tramp-ange-ftp-file-name-p v1-multi-method v1-method) 2359 (when (and (tramp-ange-ftp-file-name-p v1-multi-method v1-method)
2376 (tramp-ange-ftp-file-name-p v2-multi-method v2-method)) 2360 (tramp-ange-ftp-file-name-p v2-multi-method v2-method))
2377 (tramp-invoke-ange-ftp 2361 (if (eq op 'copy)
2378 (if (eq op 'copy) 'copy-file 'rename-file) 2362 (tramp-invoke-ange-ftp
2379 filename newname ok-if-already-exists keep-date)) 2363 'copy-file filename newname ok-if-already-exists keep-date)
2364 (tramp-invoke-ange-ftp
2365 'rename-file filename newname ok-if-already-exists)))
2380 ;; Check if we can use a shortcut. 2366 ;; Check if we can use a shortcut.
2381 (if (and (equal v1-multi-method v2-multi-method) 2367 (if (and (equal v1-multi-method v2-multi-method)
2382 (equal v1-method v2-method) 2368 (equal v1-method v2-method)
@@ -2956,7 +2942,7 @@ This will break if COMMAND prints a newline, followed by the value of
2956 (with-parsed-tramp-file-name filename nil 2942 (with-parsed-tramp-file-name filename nil
2957 (when (tramp-ange-ftp-file-name-p multi-method method) 2943 (when (tramp-ange-ftp-file-name-p multi-method method)
2958 (tramp-invoke-ange-ftp 'write-region 2944 (tramp-invoke-ange-ftp 'write-region
2959 start end filename append visit lockname confirm)) 2945 start end filename append visit))
2960 (let ((curbuf (current-buffer)) 2946 (let ((curbuf (current-buffer))
2961 (rcp-program (tramp-get-rcp-program multi-method method)) 2947 (rcp-program (tramp-get-rcp-program multi-method method))
2962 (rcp-args (tramp-get-rcp-args multi-method method)) 2948 (rcp-args (tramp-get-rcp-args multi-method method))
@@ -3228,7 +3214,9 @@ necessary anymore."
3228 3214
3229(defun tramp-invoke-ange-ftp (operation &rest args) 3215(defun tramp-invoke-ange-ftp (operation &rest args)
3230 "Invoke the Ange-FTP handler function and throw." 3216 "Invoke the Ange-FTP handler function and throw."
3231 (or (boundp 'ange-ftp-name-format) (require 'ange-ftp)) 3217 (or (boundp 'ange-ftp-name-format)
3218 (and (require 'ange-ftp)
3219 (tramp-disable-ange-ftp)))
3232 (let ((ange-ftp-name-format 3220 (let ((ange-ftp-name-format
3233 (list (nth 0 tramp-file-name-structure) 3221 (list (nth 0 tramp-file-name-structure)
3234 (nth 3 tramp-file-name-structure) 3222 (nth 3 tramp-file-name-structure)
@@ -3240,7 +3228,9 @@ necessary anymore."
3240 3228
3241(defun tramp-ange-ftp-file-name-p (multi-method method) 3229(defun tramp-ange-ftp-file-name-p (multi-method method)
3242 "Check if it's a filename that should be forwarded to Ange-FTP." 3230 "Check if it's a filename that should be forwarded to Ange-FTP."
3243 (and (null multi-method) (string= method tramp-ftp-method))) 3231 (and (not (featurep 'xemacs))
3232 (null multi-method)
3233 (string= method tramp-ftp-method)))
3244 3234
3245 3235
3246;;; Interactions with other packages: 3236;;; Interactions with other packages:
@@ -3836,42 +3826,6 @@ Maybe the different regular expressions need to be tuned.
3836 (erase-buffer) 3826 (erase-buffer)
3837 (tramp-process-actions p multi-method method user host 3827 (tramp-process-actions p multi-method method user host
3838 tramp-actions-before-shell) 3828 tramp-actions-before-shell)
3839
3840;; (tramp-message 9 "Waiting for login prompt...")
3841;; (unless (tramp-wait-for-regexp p nil tramp-login-prompt-regexp)
3842;; (pop-to-buffer (buffer-name))
3843;; (kill-process p)
3844;; (error "Couldn't find remote login prompt"))
3845;; (erase-buffer)
3846;; ;; Remote login defaults to local one.
3847;; (tramp-message 9 "Sending login name %s" (or user (user-login-name)))
3848;; (process-send-string p (concat (or user (user-login-name))
3849;; tramp-rsh-end-of-line))
3850;; (tramp-message 9 "Waiting for password prompt...")
3851;; (unless (setq found (tramp-wait-for-regexp
3852;; p nil tramp-password-prompt-regexp))
3853;; (pop-to-buffer (buffer-name))
3854;; (kill-process p)
3855;; (error "Couldn't find remote password prompt"))
3856;; (erase-buffer)
3857;; (setq pw (tramp-read-passwd (car found)))
3858;; (tramp-message 9 "Sending password")
3859;; (process-send-string p (concat pw tramp-rsh-end-of-line))
3860;; (tramp-message 9 "Waiting 30s for remote shell to come up...")
3861;; (unless (setq found
3862;; (tramp-wait-for-regexp
3863;; p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3864;; tramp-wrong-passwd-regexp
3865;; shell-prompt-pattern
3866;; tramp-shell-prompt-pattern)))
3867;; (pop-to-buffer (buffer-name))
3868;; (kill-process p)
3869;; (error "Couldn't find remote shell prompt"))
3870;; (when (nth 1 found)
3871;; (pop-to-buffer (buffer-name))
3872;; (kill-process p)
3873;; (error "Login failed: %s" (nth 1 found)))
3874
3875 (tramp-open-connection-setup-interactive-shell 3829 (tramp-open-connection-setup-interactive-shell
3876 p multi-method method user host) 3830 p multi-method method user host)
3877 (tramp-post-connection multi-method method user host))))) 3831 (tramp-post-connection multi-method method user host)))))
@@ -3936,45 +3890,6 @@ arguments, and xx will be used as the host name to connect to.
3936 (set-buffer buf) 3890 (set-buffer buf)
3937 (tramp-process-actions p multi-method method user host 3891 (tramp-process-actions p multi-method method user host
3938 tramp-actions-before-shell) 3892 tramp-actions-before-shell)
3939
3940;; (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
3941;; (setq found
3942;; (tramp-wait-for-regexp
3943;; p 60
3944;; (format
3945;; "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3946;; tramp-password-prompt-regexp
3947;; shell-prompt-pattern tramp-shell-prompt-pattern)))
3948;; (unless found
3949;; (pop-to-buffer (buffer-name))
3950;; (kill-process p)
3951;; (error "Couldn't find remote shell or passwd prompt"))
3952;; (when (nth 1 found)
3953;; (when (tramp-method-out-of-band-p multi-method method)
3954;; (pop-to-buffer (buffer-name))
3955;; (kill-process p)
3956;; (error (concat "Out of band method `%s' not applicable"
3957;; " for remote shell asking for a password")
3958;; method))
3959;; (erase-buffer)
3960;; (tramp-message 9 "Sending password...")
3961;; (tramp-enter-password p (nth 1 found))
3962;; (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
3963;; (setq found (tramp-wait-for-regexp
3964;; p 60
3965;; (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3966;; tramp-wrong-passwd-regexp
3967;; shell-prompt-pattern
3968;; tramp-shell-prompt-pattern))))
3969;; (unless found
3970;; (pop-to-buffer (buffer-name))
3971;; (kill-process p)
3972;; (error "Couldn't find remote shell prompt"))
3973;; (when (nth 1 found)
3974;; (pop-to-buffer (buffer-name))
3975;; (kill-process p)
3976;; (error "Login failed: %s" (nth 1 found)))
3977
3978 (tramp-message 7 "Initializing remote shell") 3893 (tramp-message 7 "Initializing remote shell")
3979 (tramp-open-connection-setup-interactive-shell 3894 (tramp-open-connection-setup-interactive-shell
3980 p multi-method method user host) 3895 p multi-method method user host)
@@ -4003,10 +3918,9 @@ prompt than you do, so it is not at all unlikely that the variable
4003 "Cannot connect to different host `%s' with `su' connection method" 3918 "Cannot connect to different host `%s' with `su' connection method"
4004 host)) 3919 host))
4005 (when (not user) 3920 (when (not user)
4006 (error "Must give user name for `su' connection method")) 3921 (setq user "root"))
4007 (tramp-pre-connection multi-method method user host) 3922 (tramp-pre-connection multi-method method user host)
4008 (tramp-message 7 "Opening connection for `%s' using `%s'..." 3923 (tramp-message 7 "Opening connection for `%s' using `%s'..." user method)
4009 (or user (user-login-name)) method)
4010 (let ((process-environment (copy-sequence process-environment))) 3924 (let ((process-environment (copy-sequence process-environment)))
4011 (setenv "TERM" tramp-terminal-type) 3925 (setenv "TERM" tramp-terminal-type)
4012 (let* ((default-directory (tramp-temporary-file-directory)) 3926 (let* ((default-directory (tramp-temporary-file-directory))
@@ -4027,37 +3941,6 @@ prompt than you do, so it is not at all unlikely that the variable
4027 (set-buffer (tramp-get-buffer multi-method method user host)) 3941 (set-buffer (tramp-get-buffer multi-method method user host))
4028 (tramp-process-actions p multi-method method user host 3942 (tramp-process-actions p multi-method method user host
4029 tramp-actions-before-shell) 3943 tramp-actions-before-shell)
4030
4031;; (tramp-message 9 "Waiting 30s for shell or password prompt...")
4032;; (unless (setq found (tramp-wait-for-regexp
4033;; p 30
4034;; (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4035;; tramp-password-prompt-regexp
4036;; shell-prompt-pattern
4037;; tramp-shell-prompt-pattern)))
4038;; (pop-to-buffer (buffer-name))
4039;; (kill-process p)
4040;; (error "Couldn't find shell or password prompt"))
4041;; (when (nth 1 found)
4042;; (erase-buffer)
4043;; (setq pw (tramp-read-passwd (car found)))
4044;; (tramp-message 9 "Sending password")
4045;; (process-send-string p (concat pw tramp-rsh-end-of-line))
4046;; (tramp-message 9 "Waiting 30s for remote shell to come up...")
4047;; (unless (setq found
4048;; (tramp-wait-for-regexp
4049;; p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4050;; tramp-wrong-passwd-regexp
4051;; shell-prompt-pattern
4052;; tramp-shell-prompt-pattern)))
4053;; (pop-to-buffer (buffer-name))
4054;; (kill-process p)
4055;; (error "Couldn't find remote shell prompt"))
4056;; (when (nth 1 found)
4057;; (pop-to-buffer (buffer-name))
4058;; (kill-process p)
4059;; (error "`su' failed: %s" (nth 1 found))))
4060
4061 (tramp-open-connection-setup-interactive-shell 3944 (tramp-open-connection-setup-interactive-shell
4062 p multi-method method user host) 3945 p multi-method method user host)
4063 (tramp-post-connection multi-method method 3946 (tramp-post-connection multi-method method
@@ -4120,7 +4003,7 @@ log in as u2 to h2."
4120 (entry (assoc m tramp-multi-connection-function-alist)) 4003 (entry (assoc m tramp-multi-connection-function-alist))
4121 (multi-func (nth 1 entry)) 4004 (multi-func (nth 1 entry))
4122 (command (nth 2 entry))) 4005 (command (nth 2 entry)))
4123 ;; The multi-funcs don't need to do save-match-data, as that 4006 ;; The multi-funcs don't need to do save-match-data, as that
4124 ;; is done here. 4007 ;; is done here.
4125 (funcall multi-func p m u h command) 4008 (funcall multi-func p m u h command)
4126 (erase-buffer) 4009 (erase-buffer)
@@ -4150,40 +4033,7 @@ If USER is nil, uses the return value of (user-login-name) instead."
4150 (tramp-message 9 "Sending telnet command `%s'" cmd1) 4033 (tramp-message 9 "Sending telnet command `%s'" cmd1)
4151 (process-send-string p cmd) 4034 (process-send-string p cmd)
4152 (tramp-process-multi-actions p method user host 4035 (tramp-process-multi-actions p method user host
4153 tramp-multi-actions) 4036 tramp-multi-actions)))
4154
4155;; (tramp-message 9 "Waiting 30s for login prompt from %s" host)
4156;; (unless (tramp-wait-for-regexp p 30 tramp-login-prompt-regexp)
4157;; (pop-to-buffer (buffer-name))
4158;; (kill-process p)
4159;; (error "Couldn't find login prompt from host %s" host))
4160;; (erase-buffer)
4161;; (tramp-message 9 "Sending login name %s" (or user (user-login-name)))
4162;; (process-send-string p (concat (or user (user-login-name)) tramp-rsh-end-of-line))
4163;; (tramp-message 9 "Waiting for password prompt")
4164;; (unless (setq found (tramp-wait-for-regexp p nil tramp-password-prompt-regexp))
4165;; (pop-to-buffer (buffer-name))
4166;; (kill-process p)
4167;; (error "Couldn't find password prompt from host %s" host))
4168;; (erase-buffer)
4169;; (setq pw (tramp-read-passwd
4170;; (format "Password for %s@%s, %s" (or user (user-login-name)) host found)))
4171;; (tramp-message 9 "Sending password")
4172;; (process-send-string p (concat pw tramp-rsh-end-of-line))
4173;; (tramp-message 9 "Waiting 60s for remote shell to come up...")
4174;; (unless (setq found (tramp-wait-for-regexp
4175;; p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4176;; tramp-wrong-passwd-regexp
4177;; shell-prompt-pattern
4178;; tramp-shell-prompt-pattern)))
4179;; (pop-to-buffer (buffer-name))
4180;; (kill-process p)
4181;; (error "Couldn't find shell prompt from host %s" host))
4182;; (when (nth 1 found)
4183;; (pop-to-buffer (buffer-name))
4184;; (kill-process p)
4185;; (error "Login to %s failed: %s" (nth 2 found)))
4186 ))
4187 4037
4188;; HHH: Changed. Multi method. Don't know how to handle this in the case 4038;; HHH: Changed. Multi method. Don't know how to handle this in the case
4189;; of no user name provided. Hack to make it work as it did before: 4039;; of no user name provided. Hack to make it work as it did before:
@@ -4209,36 +4059,7 @@ If USER is nil, uses the return value of (user-login-name) instead."
4209 (tramp-message 9 "Sending rlogin command `%s'" cmd1) 4059 (tramp-message 9 "Sending rlogin command `%s'" cmd1)
4210 (process-send-string p cmd) 4060 (process-send-string p cmd)
4211 (tramp-process-multi-actions p method user host 4061 (tramp-process-multi-actions p method user host
4212 tramp-multi-actions) 4062 tramp-multi-actions)))
4213;; (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
4214;; (unless (setq found
4215;; (tramp-wait-for-regexp p 60
4216;; (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4217;; tramp-password-prompt-regexp
4218;; shell-prompt-pattern
4219;; tramp-shell-prompt-pattern)))
4220;; (pop-to-buffer (buffer-name))
4221;; (kill-process p)
4222;; (error "Couldn't find remote shell or passwd prompt"))
4223;; (when (nth 1 found)
4224;; (erase-buffer)
4225;; (tramp-message 9 "Sending password...")
4226;; (tramp-enter-password p (nth 1 found))
4227;; (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
4228;; (setq found (tramp-wait-for-regexp p 60
4229;; (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4230;; tramp-wrong-passwd-regexp
4231;; shell-prompt-pattern
4232;; tramp-shell-prompt-pattern))))
4233;; (unless found
4234;; (pop-to-buffer (buffer-name))
4235;; (kill-process p)
4236;; (error "Couldn't find remote shell prompt"))
4237;; (when (nth 1 found)
4238;; (pop-to-buffer (buffer-name))
4239;; (kill-process p)
4240;; (error "Login failed: %s" (nth 1 found)))
4241 ))
4242 4063
4243;; HHH: Changed. Multi method. Don't know how to handle this in the case 4064;; HHH: Changed. Multi method. Don't know how to handle this in the case
4244;; of no user name provided. Hack to make it work as it did before: 4065;; of no user name provided. Hack to make it work as it did before:
@@ -4265,36 +4086,7 @@ character."
4265 (tramp-message 9 "Sending su command `%s'" cmd1) 4086 (tramp-message 9 "Sending su command `%s'" cmd1)
4266 (process-send-string p cmd) 4087 (process-send-string p cmd)
4267 (tramp-process-multi-actions p method user host 4088 (tramp-process-multi-actions p method user host
4268 tramp-multi-actions) 4089 tramp-multi-actions)))
4269;; (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or user (user-login-name)))
4270;; (unless (setq found (tramp-wait-for-regexp
4271;; p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4272;; tramp-password-prompt-regexp
4273;; shell-prompt-pattern
4274;; tramp-shell-prompt-pattern)))
4275;; (pop-to-buffer (buffer-name))
4276;; (kill-process p)
4277;; (error "Couldn't find shell or passwd prompt for %s"
4278;; (or user (user-login-name))))
4279;; (when (nth 1 found)
4280;; (tramp-message 9 "Sending password...")
4281;; (tramp-enter-password p (nth 1 found))
4282;; (erase-buffer)
4283;; (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
4284;; (setq found (tramp-wait-for-regexp p 60
4285;; (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4286;; tramp-wrong-passwd-regexp
4287;; shell-prompt-pattern
4288;; tramp-shell-prompt-pattern))))
4289;; (unless found
4290;; (pop-to-buffer (buffer-name))
4291;; (kill-process p)
4292;; (error "Couldn't find remote shell prompt"))
4293;; (when (nth 1 found)
4294;; (pop-to-buffer (buffer-name))
4295;; (kill-process p)
4296;; (error "Login failed: %s" (nth 1 found)))
4297 ))
4298 4090
4299;; Utility functions. 4091;; Utility functions.
4300 4092