From b6a83a1bd1c7c69316374c510aaff4b13054271e Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 23 Jul 2021 12:12:13 -0700 Subject: EVAL-IN-GRANDCHILD: call POSIX-LOGIN-ENVIRONMENT before PREREQUEST It's possible that the home directory or username have been changed since the fork control child was created, perhaps by INSTALLER:CLEANLY-INSTALLED-ONCE. Signed-off-by: Sean Whitton --- src/image.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/image.lisp') diff --git a/src/image.lisp b/src/image.lisp index e3fb651..681c9c9 100644 --- a/src/image.lisp +++ b/src/image.lisp @@ -85,13 +85,17 @@ FORMS. PREREQUEST will be evaluated before the grandchild calls fork(2) to establish its own infrastructure for subsequent uses of this macro, and REQUEST after. Thus, PREREQUEST must not start up any threads." - (flet ((wrap (form) + (flet ((wrap (&rest forms) ``(let ((*host* ,*host*) (*connection* ,*connection*) (*no-data-sources* t) (*consfigurator-debug-level* ,*consfigurator-debug-level*)) - ,,form))) - `(with-fork-request ,(wrap prerequest) ,(wrap request) (,out ,err ,exit) + ,,@forms))) + `(with-fork-request + ,(wrap '`(posix-login-environment + ,(get-connattr :remote-user) ,(get-connattr :remote-home)) + prerequest) + ,(wrap request) (,out ,err ,exit) ,@forms))) (defun dump-consfigurator (filename form) -- cgit v1.2.3