emacs-diffs
[Top][All Lists]
Advanced

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

master 80cccd7 1/4: Code cleanup for Tramp's yubikey integration


From: Michael Albinus
Subject: master 80cccd7 1/4: Code cleanup for Tramp's yubikey integration
Date: Sun, 8 Aug 2021 10:19:08 -0400 (EDT)

branch: master
commit 80cccd7ff15d254cb412e9939e27a348fbaa0425
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Code cleanup for Tramp's yubikey integration
    
    * lisp/net/tramp-sh.el (tramp-actions-before-shell)
    (tramp-actions-copy-out-of-band):
    Use `tramp-security-key-confirm-regexp'.
    
    * lisp/net/tramp.el (tramp-security-key-confirm-regexp): Rename from
    `tramp-yubikey-regexp'.  Adapt docstring.
    (tramp-security-key-confirmed-regexp): New defcustom.
    (tramp-action-show-and-confirm-message):
    Redisplay.  Use `tramp-security-key-confirmed-regexp'.
---
 lisp/net/tramp-sh.el | 4 ++--
 lisp/net/tramp.el    | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 7cf90b9..e7d2634 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -519,7 +519,7 @@ shell from reading its init file."
     (tramp-yn-prompt-regexp tramp-action-yn)
     (tramp-terminal-prompt-regexp tramp-action-terminal)
     (tramp-antispoof-regexp tramp-action-confirm-message)
-    (tramp-yubikey-regexp tramp-action-show-and-confirm-message)
+    (tramp-security-key-confirm-regexp tramp-action-show-and-confirm-message)
     (tramp-process-alive-regexp tramp-action-process-alive))
   "List of pattern/action pairs.
 Whenever a pattern matches, the corresponding action is performed.
@@ -537,7 +537,7 @@ corresponding PATTERN matches, the ACTION function is 
called.")
   '((tramp-password-prompt-regexp tramp-action-password)
     (tramp-wrong-passwd-regexp tramp-action-permission-denied)
     (tramp-copy-failed-regexp tramp-action-permission-denied)
-    (tramp-yubikey-regexp tramp-action-show-and-confirm-message)
+    (tramp-security-key-confirm-regexp tramp-action-show-and-confirm-message)
     (tramp-process-alive-regexp tramp-action-out-of-band))
   "List of pattern/action pairs.
 This list is used for copying/renaming with out-of-band methods.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 959a0e7..2175746 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4691,10 +4691,11 @@ Wait, until the connection buffer changes."
       (goto-char (point-min))
       (tramp-check-for-regexp proc tramp-process-action-regexp)
       (with-temp-message (replace-regexp-in-string "[\r\n]" "" (match-string 
0))
+       (redisplay 'force)
        ;; Hide message in buffer.
        (narrow-to-region (point-max) (point-max))
        ;; Wait for new output.
-       (tramp-wait-for-regexp proc 30 "."))
+       (tramp-wait-for-regexp proc 30 tramp-security-key-confirmed-regexp))
       ;; Reenable the timers.
       (with-timeout-unsuspend stimers)))
   t)



reply via email to

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