diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-23 17:02:40 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-23 17:02:40 -0700 |
commit | 8ea7ea4103aec49e2002466b5f22d3152a7f9a04 (patch) | |
tree | c7b1c1272fac616e64cdae877e036896a1b1b9b2 | |
parent | bf304f4c287f0a4501be6c0d4680c403a43735fd (diff) | |
download | consfigurator-8ea7ea4103aec49e2002466b5f22d3152a7f9a04.tar.gz |
fix checking stream element type in CONSFIGURATOR.CONNECTION.SUDO
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/connection/sudo.lisp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp index 75b7ec8..551741f 100644 --- a/src/connection/sudo.lisp +++ b/src/connection/sudo.lisp @@ -81,13 +81,12 @@ (new-input (cond ((and password input) (make-concatenated-stream - (case (stream-element-type input-stream) - (character - password-stream) - (t - (babel-streams:make-in-memory-input-stream - (babel:string-to-octets password :encoding :UTF-8) - :element-type (stream-element-type input-stream)))) + (if (subtypep (stream-element-type input-stream) + 'character) + password-stream + (babel-streams:make-in-memory-input-stream + (babel:string-to-octets password :encoding :UTF-8) + :element-type (stream-element-type input-stream))) input-stream)) (password password-stream) |