From 80b5cb9cea4a4d56455661678d896514312109eb Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 25 Jul 2021 13:03:57 -0700 Subject: add DEFINE-ERROR-RETVAL-CFUN, CHROOT, CLEARENV Signed-off-by: Sean Whitton --- src/connection/chroot.lisp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/connection') 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 -- cgit v1.2.3