From 77f802c1642c3a8b379f6031b2652b072e75aba7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 26 Jan 2022 19:31:29 +0000 Subject: [PATCH] Do not include PATH in container_environment Signed-off-by: Laurent Bercot --- .../package/admin/s6-overlay-@VERSION@/libexec/stage0 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/libexec/stage0 b/layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/libexec/stage0 index f47795b..6a2f4e0 100755 --- a/layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/libexec/stage0 +++ b/layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/libexec/stage0 @@ -66,9 +66,12 @@ fi s6-linux-init-maker -NC -D top -c "$basedir" -p "$PATH" -f /package/admin/s6-overlay-@VERSION@/etc/s6-linux-init/skel $stampopt $dumpopt $logopt $loguseropt $graceopt $syncopt -- "$basedir" -if test -z "$dumpopt" ; then +if test -n "$dumpopt" ; then + s6-rmrf /run/s6/container_environment/PATH +else s6-rename "$basedir/env" "$basedir/env.orig" s6-dumpenv "$basedir/env" + s6-rmrf "$basedir/env/PATH" for file in `s6-ls "$basedir/env.orig"` ; do s6-hiercopy "$basedir/env.orig/$file" "$basedir/env/$file" done