aboutsummaryrefslogtreecommitdiff
path: root/src/connection/sudo.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-03-11 15:27:00 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-03-11 16:40:08 -0700
commit4e0a4c107e4a2ee708e6e7a9f3edf189fe858f14 (patch)
treeb8e51af43f895a98ebd943580c51c1da38151bdf /src/connection/sudo.lisp
parentf2ba47b7ef017a01a4b6c13982ff43a67cc6abd5 (diff)
downloadconsfigurator-4e0a4c107e4a2ee708e6e7a9f3edf189fe858f14.tar.gz
replace ESCAPE-SH-TOKEN and ESCAPE-SH-COMMAND with new SH-ESCAPE
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/sudo.lisp')
-rw-r--r--src/connection/sudo.lisp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index da50673..486c8eb 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -79,7 +79,7 @@
(user (connection-connattr connection :remote-user))
(prefix (if file
(format nil "cat ~A - | sudo -HkS --prompt=\"\""
- (escape-sh-token file))
+ (sh-escape file))
"sudo -Hkn")))
;; 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.
@@ -94,4 +94,4 @@
(mrun :may-fail :input input
(format nil
"~A ~:[~;--preserve-env=SSH_AUTH_SOCK ~]--user=~A sh -c ~A"
- prefix (string= user "root") user (escape-sh-token cmd)))))
+ prefix (string= user "root") user (sh-escape cmd)))))