aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-25 13:03:57 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-10-21 14:29:18 -0700
commit80b5cb9cea4a4d56455661678d896514312109eb (patch)
treee2705ceb2a362f39941c6d9fddd90412e8f280e8 /src/connection
parentfb80b0853bf162a5820c8b7877ecdffc51966d10 (diff)
downloadconsfigurator-80b5cb9cea4a4d56455661678d896514312109eb.tar.gz
add DEFINE-ERROR-RETVAL-CFUN, CHROOT, CLEARENV
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/chroot.lisp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index 6b3f29e..5ea3c7a 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -120,10 +120,7 @@ should be the mount point, without the chroot's root prefixed.")
(connection-teardown connection))))
(defmethod post-fork ((connection chroot.fork-connection))
- (with-slots (into) connection
- (unless (zerop
- (foreign-funcall "chroot" :string (unix-namestring into) :int))
- (error "chroot(2) failed!")))
+ (chroot (unix-namestring (slot-value connection 'into)))
(let ((home (connection-connattr connection :remote-home)))
(setf (getenv "HOME") (unix-namestring home))
;; chdir, else our current working directory is a pointer to something