Commit e1bf01c6 authored by jan.koester's avatar jan.koester
Browse files

Set PATH/ENV in TTY child process

parent 132aea8e
Loading
Loading
Loading
Loading
+6 −0
Changes for src/tty.cpp: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -70,6 +70,12 @@ namespace syslite {
            signal(SIGINT, SIG_DFL);
            signal(SIGHUP, SIG_DFL);

            // Set PATH so login shells have the full system path
            setenv("PATH", "/usr/local/sbin:/usr/local/musl/bin:/usr/local/bin:/bin:/sbin", 1);
            setenv("LD_LIBRARY_PATH", "/usr/local/musl/lib:/usr/local/lib", 1);
            setenv("ENV", "/etc/profile", 1);
            setenv("TERM", "linux", 0);

            // Parse command into argv
            std::vector<std::string> args;
            std::istringstream iss(tty.command);