[FS#909] runas wrapper executes programs using wrong interpreter

LEDE Bugs lede-bugs at lists.infradead.org
Sat Jul 15 21:04:33 PDT 2017


The following task has a new comment added:

FS#909 - runas wrapper executes programs using wrong interpreter
User who did this - Kirill Elagin (kirelagin)

----------
I actually spent quite a few hours trying to come up with a solution, and the problem is surprisingly hard.

The only fresh idea I’ve got so far is to move all the binaries into a separate directory, rename back, and then use `execvp` instead of `execv`, setting `PATH` to that separate directory beforehand.

The original commit motivation lists two issues: `argv[0]` not being preserved (who cares?) and something about resources lookup relative to the executable location. Any one of those can be done: drop all the `runas` stuff to get 2 whitout 1; do what I suggested in the previous paragraph to get 1 without 2. But I am pretty sure by now that there is no way to get both without doing an insane amount of work. I hope someone can prove me wrong.
----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=909#comment2972



More information about the lede-bugs mailing list