aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-10 14:26:12 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-10 16:41:53 -0700
commit2cd6181492f8ea14cfb92c5df60eb99604f7646d (patch)
tree25679fa93db128a0bab184c140e442afd4ff144c /src/connection
parent3304c0b4992943d5e440b69574e517e1b86eb394 (diff)
downloadconsfigurator-2cd6181492f8ea14cfb92c5df60eb99604f7646d.tar.gz
rename PASSPHRASE class and its associated functions
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/sudo.lisp17
1 files changed, 9 insertions, 8 deletions
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)))