tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.0.4); probs with latest tramp changes


From: Kai Großjohann
Subject: Re: tramp (2.0.4); probs with latest tramp changes
Date: Mon, 29 Jul 2002 16:12:48 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Marco Lonsing <address@hidden> writes:

> 1.) Shouldn't the ssh method allow interactive logins? That doesn't
>     work. Tramp is waiting at the password prompt until it times out.

It should indeed.  Thanks for testing.  The mechanism for finding
password prompts has changed.  So maybe I b0rked a regexp.  Can you
try again, until the *tramp/foo* buffer contains the password prompt,
then send me that buffer?

Ah, I think I found it.  Please try the patch after my signature, or
the most recent version from CVS.

> 2.) I open /ssh:address@hidden:/root/ and get the directory listing as
>     expected. If I open /ssh:address@hidden:/ or choose a file in the dired
>     buffer (here .tramp_history) I get the following backtrace:
>
>    Debugger entered--Lisp error: (args-out-of-range [] 1)
>      tramp-mode-string-to-int(nil)
>      tramp-handle-file-modes("/ssh:address@hidden:/root/.tramp_history")

Whee.  How come this?  I didn't change anything in that area of
Tramp.  I wonder if it's a followup error from the previous one?

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

Index: lisp/tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.154
diff -u -r2.154 tramp.el
--- lisp/tramp.el       29 Jul 2002 08:22:47 -0000      2.154
+++ lisp/tramp.el       29 Jul 2002 14:09:37 -0000
@@ -691,16 +691,16 @@
   :type '(repeat string))
 
 (defcustom tramp-login-prompt-regexp
-  ".*ogin: *$"
+  ".*ogin: *"
   "*Regexp matching login-like prompts.
-The regexp should match the whole line."
+The regexp should match at end of buffer."
   :group 'tramp
   :type 'regexp)
 
 (defcustom tramp-password-prompt-regexp
-  "^.*\\([pP]assword\\|passphrase.*\\):address@hidden *$"
+  "^.*\\([pP]assword\\|passphrase.*\\):address@hidden *"
   "*Regexp matching password-like prompts.
-The regexp should match the whole line.
+The regexp should match at end of buffer.
 
 The `sudo' program appears to insert a `^@' character into the prompt."
   :group 'tramp
@@ -709,9 +709,9 @@
 (defcustom tramp-wrong-passwd-regexp
   (concat "^.*\\(Permission denied.\\|Login [Ii]ncorrect\\|"
           "Received signal [0-9]+\\|Connection \\(refused\\|closed\\)\\|"
-          "Sorry, try again.\\|Name or service not known\\).*$")
+          "Sorry, try again.\\|Name or service not known\\).*")
   "*Regexp matching a `login failed' message.
-The regexp should match the whole line."
+The regexp should match at end of buffer."
   :group 'tramp
   :type 'regexp)
 
@@ -3444,6 +3444,7 @@
   "Send the login name."
   (tramp-message 9 "Sending login name `%s'"
                 (or user (user-login-name)))
+  (erase-buffer)
   (process-send-string nil (concat (or user (user-login-name))
                                   tramp-rsh-end-of-line)))
 
@@ -3459,12 +3460,14 @@
 (defun tramp-action-succeed (p multi-method method user host)
   "Signal success in finding shell prompt."
   (tramp-message 9 "Found remote shell prompt.")
+  (erase-buffer)
   (throw 'tramp-action 'ok))
 
 (defun tramp-action-permission-denied (p multi-method method user host)
   "Signal permission denied."
   (tramp-message 9 "Permission denied by remote host.")
   (kill-process p)
+  (erase-buffer)
   (throw 'tramp-action 'permission-denied))
 
 ;; The following functions are specifically for multi connections.
@@ -3472,6 +3475,7 @@
 (defun tramp-multi-action-login (p method user host)
   "Send the login name."
   (tramp-message 9 "Sending login name `%s'" user)
+  (erase-buffer)
   (process-send-string p (concat user tramp-rsh-end-of-line)))
 
 (defun tramp-multi-action-password (p method user host)
@@ -3481,12 +3485,14 @@
 (defun tramp-multi-action-succeed (p method user host)
   "Signal success in finding shell prompt."
   (tramp-message 9 "Found shell prompt on `%s'" host)
+  (erase-buffer)
   (throw 'tramp-action 'ok))
 
 (defun tramp-multi-action-permission-denied (p method user host)
   "Signal permission denied."
   (tramp-message 9 "Permission denied by remote host `%s'" host)
   (kill-process p)
+  (erase-buffer)
   (throw 'tramp-action 'permission-denied))
 
 ;; Functions for processing the actions.
@@ -3499,6 +3505,7 @@
     (with-timeout (60 (throw 'tramp-action 'timeout))
       (while (not found)
        (accept-process-output p 1)
+       (goto-char (point-min))
        (setq todo actions)
        (while todo
          (goto-char (point-min))
@@ -3534,6 +3541,7 @@
       (while (not found)
        (accept-process-output p 1)
        (setq todo actions)
+       (goto-char (point-min))
        (while todo
          (goto-char (point-min))
          (setq item (pop todo))
@@ -4100,6 +4108,7 @@
   "Prompt for a password and send it to the remote end.
 Uses PROMPT as a prompt and sends the password to process P."
   (let ((pw (tramp-read-passwd prompt)))
+    (erase-buffer)
     (process-send-string p (concat pw tramp-rsh-end-of-line))))
 
 ;; HHH: Not Changed.  This might handle the case where USER is not



reply via email to

[Prev in Thread] Current Thread [Next in Thread]