pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can anybody come with a creative solution to the "/bin/sh: bad interpreter" problem?



On 26/01/17 22:11, Ottavio Caruso wrote:
> Most, if not all, pkgsrc scripta are simple shell scripts that start
> with the canonical shebang:
> #! /bin/sh

If you can be root, you could install inside a chroot or overlay a
"/bin/sh" using loopback mount.

If you can not be root, I would try something like "LD_PRELOAD" to
intercept directory traversals. You only need to intercept a couple of
calls, like "open()" or "exists()", just enough to fake it.

Maybe this wins me the price for "creativeness" :).

In any case, I doubt a lot that just solving "/bin/sh" be a big advance
in the quest of pkgsrc support on Android :).

Good luck :).

-- 
Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
jcea%jcea.es@localhost - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea%jabber.org@localhost  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index