Hi, I've just committed the incorporation of "luasocket" by Diego Nehab, see http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/ This allows luatex to browse the web ;-) The lua support modules are also preloaded inside the executable, so there are still no external file dependancies. But a small warning is in order: The inclusion is not yet completely finished. There is still a mis-configuration during cross-compile build for mingw32. The problem is that on windows, luatex now needs to be linked against the winsock library. (On linux, sockets are built in so it works without further configuration, I do not know the situation on other platforms). So crosscompilation works only after manual intervention by (after a failed build is complete) setting socketlibs = -lwsock32 in build-windows/texk/web2c/Makefile, then relinking. Perhaps other systems require similar trickery for now. I will fix this soon, but not today. On linux all should compile fine, and you should be able to compile and run the examples from src/libs/luasocket/{etc,samples,test} under "texlua" without need to change anything inside them. Testing welcome. Best wishes, Taco
Hello,
I've just committed the incorporation of "luasocket" by Diego Nehab, see http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
This allows luatex to browse the web ;-)
What about luacoffee? I'd like LuaTeX to make coffee ;-) But seriously: From looking into the Context source, it seems that this would be used to download modules/packages/files on the fly, just like MikTeX does it. A security consideration, though: There should be an option to disable this module to prevent LuaTeX from playing E.T. (phoning home). Extending the --safer option would not be fine-grained enough, since this option only deals with local accesses, not remote ones. So maybe a --nosocket option. That way, net access can be disabled, but not file access (since --safer also prevents io.open from opening files for writing).
Best wishes, Taco
Jonathan
Jonathan Sauer wrote:
Hello,
I've just committed the incorporation of "luasocket" by Diego Nehab, see http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/
This allows luatex to browse the web ;-)
What about luacoffee? I'd like LuaTeX to make coffee ;-)
But seriously: From looking into the Context source, it seems that this would be used to download modules/packages/files on the fly, just like MikTeX does it.
this is not on my agenda yet -) the reason for adding luasocket is that in addition to files, sockets are used for i/o and we consider it therefore fundamental; support for http and ftp is in the embedded libraries, but other things will not be provided as they can be programmed in lua;
A security consideration, though: There should be an option to disable this module to prevent LuaTeX from playing E.T. (phoning home). Extending the --safer option would not be fine-grained enough, since this option only deals with local accesses, not remote ones. So maybe a --nosocket option. That way, net access can be disabled, but not file access (since --safer also prevents io.open from opening files for writing).
you can do socket = nil as first line in your startup script Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
remote ones. So maybe a --nosocket option. That way, net access can be disabled, but not file access (since --safer also prevents io.open from opening files for writing).
you can do socket = nil as first line in your startup script
Yes but that is not under the luatex-running user's control. I will add --nosocket. Best wishes, Taco
Hello,
remote ones. So maybe a --nosocket option. That way, net access can
be disabled, but not file access (since --safer also prevents io.open from opening files for writing).
you can do socket = nil as first line in your startup script
Yes but that is not under the luatex-running user's control. I will add --nosocket.
Great; thanks!
Best wishes, Taco
Jonathan
Jonathan Sauer wrote:
Hello,
remote ones. So maybe a --nosocket option. That way, net access can
be disabled, but not file access (since --safer also prevents io.open from opening files for writing). you can do socket = nil as first line in your startup script Yes but that is not under the luatex-running user's control. I will add --nosocket.
there will be more granularity with respect to blocking libs and behaviour (--safer split up and --safer then being all) so keep an eye on it; taco will certainly provide more details later Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Jonathan Sauer
-
Taco Hoekwater