diff options
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index c666de3..bc19c26 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -446,3 +446,11 @@ FORMS is typically the programmatic application of one or more properties." `(let ((*host* (make-host :propspec (make-propspec :systems nil))) (*connection* (establish-connection :local nil))) ,@forms)) + +(defmacro with-local-passwordless-sudo-connection (&body forms) + "Execute FORMS as though a passwordless :SUDO connection to localhost had been +established. Occasionally useful for testing purposes at the REPL." + `(with-local-connection + (let ((*connection* (establish-connection :sudo nil + :user "root" :password nil))) + ,@forms))) |