aboutsummaryrefslogtreecommitdiff
path: root/src/connection/sudo.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-23 21:08:20 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-23 21:10:35 -0700
commit8e151835a58eaf124d1ae066a6b940019a0c6826 (patch)
treedc3ffc51393ecd10baebcf5e14d196ff37d8ad7b /src/connection/sudo.lisp
parentf11a3ace8152d1a3e0bef5b6fd79069427322149 (diff)
downloadconsfigurator-8e151835a58eaf124d1ae066a6b940019a0c6826.tar.gz
fix GET-SUDO-PASSWORD when there is no password
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/sudo.lisp')
-rw-r--r--src/connection/sudo.lisp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index df2b1c3..8ad24f3 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -59,7 +59,8 @@
:initarg :password)))
(defmethod get-sudo-password ((connection sudo-connection))
- (passphrase (slot-value connection 'password)))
+ (let ((value (slot-value connection 'password)))
+ (and value (passphrase value))))
(defmethod connection-shell-wrap ((connection sudo-connection) cmd)
;; wrap in sh -c so that it is more likely we are either asked for a