From 39a3775f4870fb16b49fec24aa5fd506b17a0ea9 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 20 Aug 2022 17:01:53 +0200 Subject: Userland: Rely on a single authoritative source for the default `PATH` --- Userland/Services/TelnetServer/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Services') diff --git a/Userland/Services/TelnetServer/main.cpp b/Userland/Services/TelnetServer/main.cpp index 33b81d304e..b210e34305 100644 --- a/Userland/Services/TelnetServer/main.cpp +++ b/Userland/Services/TelnetServer/main.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,7 @@ static void run_command(int ptm_fd, String command) args[1] = "-c"; args[2] = command.characters(); } - char const* envs[] = { "TERM=xterm", "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin", nullptr }; + char const* envs[] = { "TERM=xterm", "PATH=" DEFAULT_PATH, nullptr }; rc = execve("/bin/Shell", const_cast(args), const_cast(envs)); if (rc < 0) { perror("execve"); -- cgit v1.2.3