/[tramp]/tramp/lisp/tramp.el
ViewVC logotype

Diff of /tramp/lisp/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.154 by kai, Mon Jul 29 08:22:47 2002 UTC revision 2.155 by kai, Mon Jul 29 14:09:49 2002 UTC
# Line 691  tilde expansion, all directory names sta Line 691  tilde expansion, all directory names sta
691    :type '(repeat string))    :type '(repeat string))
692    
693  (defcustom tramp-login-prompt-regexp  (defcustom tramp-login-prompt-regexp
694    ".*ogin: *$"    ".*ogin: *"
695    "*Regexp matching login-like prompts.    "*Regexp matching login-like prompts.
696  The regexp should match the whole line."  The regexp should match at end of buffer."
697    :group 'tramp    :group 'tramp
698    :type 'regexp)    :type 'regexp)
699    
700  (defcustom tramp-password-prompt-regexp  (defcustom tramp-password-prompt-regexp
701    "^.*\\([pP]assword\\|passphrase.*\\):\^@? *$"    "^.*\\([pP]assword\\|passphrase.*\\):\^@? *"
702    "*Regexp matching password-like prompts.    "*Regexp matching password-like prompts.
703  The regexp should match the whole line.  The regexp should match at end of buffer.
704    
705  The `sudo' program appears to insert a `^@' character into the prompt."  The `sudo' program appears to insert a `^@' character into the prompt."
706    :group 'tramp    :group 'tramp
# Line 709  The `sudo' program appears to insert a ` Line 709  The `sudo' program appears to insert a `
709  (defcustom tramp-wrong-passwd-regexp  (defcustom tramp-wrong-passwd-regexp
710    (concat "^.*\\(Permission denied.\\|Login [Ii]ncorrect\\|"    (concat "^.*\\(Permission denied.\\|Login [Ii]ncorrect\\|"
711            "Received signal [0-9]+\\|Connection \\(refused\\|closed\\)\\|"            "Received signal [0-9]+\\|Connection \\(refused\\|closed\\)\\|"
712            "Sorry, try again.\\|Name or service not known\\).*$")            "Sorry, try again.\\|Name or service not known\\).*")
713    "*Regexp matching a `login failed' message.    "*Regexp matching a `login failed' message.
714  The regexp should match the whole line."  The regexp should match at end of buffer."
715    :group 'tramp    :group 'tramp
716    :type 'regexp)    :type 'regexp)
717    
# Line 3444  Returns nil if none was found, else the Line 3444  Returns nil if none was found, else the
3444    "Send the login name."    "Send the login name."
3445    (tramp-message 9 "Sending login name `%s'"    (tramp-message 9 "Sending login name `%s'"
3446                   (or user (user-login-name)))                   (or user (user-login-name)))
3447      (erase-buffer)
3448    (process-send-string nil (concat (or user (user-login-name))    (process-send-string nil (concat (or user (user-login-name))
3449                                     tramp-rsh-end-of-line)))                                     tramp-rsh-end-of-line)))
3450    
# Line 3459  Returns nil if none was found, else the Line 3460  Returns nil if none was found, else the
3460  (defun tramp-action-succeed (p multi-method method user host)  (defun tramp-action-succeed (p multi-method method user host)
3461    "Signal success in finding shell prompt."    "Signal success in finding shell prompt."
3462    (tramp-message 9 "Found remote shell prompt.")    (tramp-message 9 "Found remote shell prompt.")
3463      (erase-buffer)
3464    (throw 'tramp-action 'ok))    (throw 'tramp-action 'ok))
3465    
3466  (defun tramp-action-permission-denied (p multi-method method user host)  (defun tramp-action-permission-denied (p multi-method method user host)
3467    "Signal permission denied."    "Signal permission denied."
3468    (tramp-message 9 "Permission denied by remote host.")    (tramp-message 9 "Permission denied by remote host.")
3469    (kill-process p)    (kill-process p)
3470      (erase-buffer)
3471    (throw 'tramp-action 'permission-denied))    (throw 'tramp-action 'permission-denied))
3472    
3473  ;; The following functions are specifically for multi connections.  ;; The following functions are specifically for multi connections.
# Line 3472  Returns nil if none was found, else the Line 3475  Returns nil if none was found, else the
3475  (defun tramp-multi-action-login (p method user host)  (defun tramp-multi-action-login (p method user host)
3476    "Send the login name."    "Send the login name."
3477    (tramp-message 9 "Sending login name `%s'" user)    (tramp-message 9 "Sending login name `%s'" user)
3478      (erase-buffer)
3479    (process-send-string p (concat user tramp-rsh-end-of-line)))    (process-send-string p (concat user tramp-rsh-end-of-line)))
3480    
3481  (defun tramp-multi-action-password (p method user host)  (defun tramp-multi-action-password (p method user host)
# Line 3481  Returns nil if none was found, else the Line 3485  Returns nil if none was found, else the
3485  (defun tramp-multi-action-succeed (p method user host)  (defun tramp-multi-action-succeed (p method user host)
3486    "Signal success in finding shell prompt."    "Signal success in finding shell prompt."
3487    (tramp-message 9 "Found shell prompt on `%s'" host)    (tramp-message 9 "Found shell prompt on `%s'" host)
3488      (erase-buffer)
3489    (throw 'tramp-action 'ok))    (throw 'tramp-action 'ok))
3490    
3491  (defun tramp-multi-action-permission-denied (p method user host)  (defun tramp-multi-action-permission-denied (p method user host)
3492    "Signal permission denied."    "Signal permission denied."
3493    (tramp-message 9 "Permission denied by remote host `%s'" host)    (tramp-message 9 "Permission denied by remote host `%s'" host)
3494    (kill-process p)    (kill-process p)
3495      (erase-buffer)
3496    (throw 'tramp-action 'permission-denied))    (throw 'tramp-action 'permission-denied))
3497    
3498  ;; Functions for processing the actions.  ;; Functions for processing the actions.
# Line 3499  Returns nil if none was found, else the Line 3505  Returns nil if none was found, else the
3505      (with-timeout (60 (throw 'tramp-action 'timeout))      (with-timeout (60 (throw 'tramp-action 'timeout))
3506        (while (not found)        (while (not found)
3507          (accept-process-output p 1)          (accept-process-output p 1)
3508            (goto-char (point-min))
3509          (setq todo actions)          (setq todo actions)
3510          (while todo          (while todo
3511            (goto-char (point-min))            (goto-char (point-min))
# Line 3534  Returns nil if none was found, else the Line 3541  Returns nil if none was found, else the
3541        (while (not found)        (while (not found)
3542          (accept-process-output p 1)          (accept-process-output p 1)
3543          (setq todo actions)          (setq todo actions)
3544            (goto-char (point-min))
3545          (while todo          (while todo
3546            (goto-char (point-min))            (goto-char (point-min))
3547            (setq item (pop todo))            (setq item (pop todo))
# Line 4100  nil." Line 4108  nil."
4108    "Prompt for a password and send it to the remote end.    "Prompt for a password and send it to the remote end.
4109  Uses PROMPT as a prompt and sends the password to process P."  Uses PROMPT as a prompt and sends the password to process P."
4110    (let ((pw (tramp-read-passwd prompt)))    (let ((pw (tramp-read-passwd prompt)))
4111        (erase-buffer)
4112      (process-send-string p (concat pw tramp-rsh-end-of-line))))      (process-send-string p (concat pw tramp-rsh-end-of-line))))
4113    
4114  ;; HHH: Not Changed.  This might handle the case where USER is not  ;; HHH: Not Changed.  This might handle the case where USER is not

Legend:
Removed from v.2.154  
changed lines
  Added in v.2.155

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26