logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: da1dba5953c6d9f191a4b23af4308ba73e14f08e
parent b1c705ffa92d2a8ea27c5a7a483ee38a99b950c7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  8 May 2024 05:38:02 +0200

init.c: export HOME and LOGNAME

Diffstat:

Minit.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/init.c b/init.c @@ -63,6 +63,9 @@ int main(int argc, char *argv[]) { setenv("PATH", "/bin:/usr/bin:/usr/local/bin", 1); + setenv("HOME", "/root", 1); + setenv("LOGNAME", "root", 1); + if(build_loksh() < 0) return 1; if(mount("sysfs", "/sys", "sysfs", MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME, NULL) < 0)