From 2cd6181492f8ea14cfb92c5df60eb99604f7646d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 10 Apr 2022 14:26:12 -0700 Subject: rename PASSPHRASE class and its associated functions Signed-off-by: Sean Whitton --- src/connection/sudo.lisp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/connection') diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp index cbdf259..459a832 100644 --- a/src/connection/sudo.lisp +++ b/src/connection/sudo.lisp @@ -61,14 +61,15 @@ (make-instance 'sudo-connection :connattrs `(:remote-user ,user) - :password-file (and password - (aprog1 (mktemp) - ;; We'll send the password followed by ^M, then the - ;; real stdin. Use CODE-CHAR in this way so that we - ;; can be sure ASCII ^M is what will get emitted. - (write-remote-file it (strcat (passphrase password) - (string (code-char 13))) - :mode #o600))))) + :password-file + (and password + (aprog1 (mktemp) + ;; We'll send the password followed by ^M, then the real stdin. Use + ;; CODE-CHAR in this way so that we can be sure ASCII ^M is what + ;; will get emitted. + (write-remote-file it (strcat (unwrap-passphrase password) + (string (code-char 13))) + :mode #o600))))) (defmethod connection-tear-down :after ((connection sudo-connection)) (when-let ((file (slot-value connection 'password-file))) -- cgit v1.2.3