aboutsummaryrefslogtreecommitdiff
path: root/src/connection/sudo.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-25 09:19:11 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-25 10:11:30 -0700
commit4170ae1f0dbc98178768857d9bac60c891bf7140 (patch)
treea90c868dda5ccb0838b669d24923b30667e4203c /src/connection/sudo.lisp
parentbaa18e953545579f9af5dc8b34dd23e091d3bf45 (diff)
downloadconsfigurator-4170ae1f0dbc98178768857d9bac60c891bf7140.tar.gz
Revert ":SUDO connection type: reset the working directory"
This reverts commit 03faea5bac3337a23d821078984c12bdbedeb022. We are now handling this in RUN, MRUN, READFILE & WRITEFILE. 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, 1 insertions, 2 deletions
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index 8ad24f3..66e0695 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -66,8 +66,7 @@
;; wrap in sh -c so that it is more likely we are either asked for a
;; password for all our commands or not asked for one for any
(format nil "sudo -HkS --prompt=\"\" --user=~A sh -c ~A"
- (slot-value connection 'user)
- (escape-sh-token (strcat "cd \"$HOME\"; " cmd))))
+ (slot-value connection 'user) (escape-sh-token cmd)))
(defmethod connection-run ((c sudo-connection) cmd (input null))
(call-next-method c cmd (get-sudo-password c)))