ssh: Set PATH if unset
authorTormod Volden <debian.tormod@gmail.com>
Thu, 4 Jun 2015 12:45:35 +0000 (14:45 +0200)
committerAlan Cox <alan@linux.intel.com>
Thu, 4 Jun 2015 12:53:50 +0000 (13:53 +0100)
Another workaround for using ssh out of the box without inittab.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Applications/util/ssh.c

index 6236711..4efc052 100644 (file)
@@ -153,6 +153,8 @@ int main(int argc, char *argval[])
     signal(SIGQUIT, SIG_IGN);
 
     if (login_sh) {
+       if (!getenv("PATH"))
+           putenv("PATH=/bin");
        home = getenv("HOME");
        if (!home) putenv("HOME=/");
        chdir(getenv("HOME"));