Several notes, not sure if that's obvious:
- uwsgi --extract sym://executable > the_executable won't work, sym://
prefix is superfluous
- chmod hook seems to have reversed order of arguments in reality (as
opposed to the example you gave): chmod:the_executable 755
Otherwise, everything seems to be working fine as per your suggestion.
Thanks for the input and the great tips!
On 28.03.2014 08:09, Roberto De Ioris wrote:
Ah, excellent. Thank you, Roberto.
Forgive me if this is obvious, but how would one go about extracting an
embedded executable and running it with this syntax, though (or passing a
configuration file to one)?
I mean, *attach-daemon still probably won't create an executable image out
of a char*...
(Though the security-minded me is screaming out at the possibility of a
possibly user-created .ini file including "executable code" (or even
directly executable code) from arbitrary sources.)
well you always need some form of "extract to file", like
uwsgi --extract data://0 > the_executable
chmod 755 the_executable
./the_executable
you can hook it as
hook-asap = exec:uwsgi --extract data://0 > the_executable
hook-asap = chmod:755 the_executable
attach-daemon = the_executable
for sure an "extract" hook would be more handy, like
hook-asap = extract:data://0 the_executable
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi