vermaneerajin / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

hardcoded PATH environment variable when looking for ssh executable #143

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I'm trying to run shellinabox on an Android platform (cross-compiled 
statically along with ssh also cross-compiled statically).
2. On Android there's no /usr or /bin folder, executable path is 
/sbin:/system/sbin:/system/bin:/system/xbin:
3. shellinaboxd looks for ssh executable within hardcoded PATH (defined in 
launcher.c: 

...
  (*environment)[numEnvVars++] = strdup(
                              "PATH=/usr/local/bin:/usr/bin:/bin:/usr/games"));
...

What is the expected output? What do you see instead?

It should at least allow to provide a configuration parameter where the 
executable for SSH is searched.

What version of the product are you using? On what operating system?

2.10

Please provide any additional information below.

After modifying the launcher.c to add /system/xbin (location where I've copied 
the ssh executable), it works!

Original issue reported on code.google.com by zburlind...@gmail.com on 4 Oct 2011 at 8:43

GoogleCodeExporter commented 8 years ago
Looks like this should be a configured parameter.

Original comment by beewoo...@gmail.com on 31 Mar 2012 at 10:51

GoogleCodeExporter commented 8 years ago
Running into a similar problem on NixOS. So far I'm patching it with a Nix 
expression or using a workaround.

Nevertheless, I welcome a patch.

Original comment by tombe...@gmail.com on 11 Dec 2013 at 3:03