diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-23 12:12:13 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-24 12:39:46 -0700 |
commit | b6a83a1bd1c7c69316374c510aaff4b13054271e (patch) | |
tree | 4024c00ba793e5feced66c382aeac910244f71de /src/image.lisp | |
parent | 826d29dea7dff94681a8c1fa933f901dd53adc59 (diff) | |
download | consfigurator-b6a83a1bd1c7c69316374c510aaff4b13054271e.tar.gz |
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 <spwhitton@spwhitton.name>
Diffstat (limited to 'src/image.lisp')
-rw-r--r-- | src/image.lisp | 10 |
1 files changed, 7 insertions, 3 deletions
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) |