texlua-based tool and restricted shell escape

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Feb 20 14:09:37 CET 2024


Hello all,

In the notes for the upcoming TL'24 version of LuaTeX, it seems that lfs 
functions should be able to work safely in restricted shell escape mode. 
Is that a fair reading?

The reason for asking is that the idea of listing files from within the 
TeX run came up (https://tex.stackexchange.com/questions/709934), and 
prompted me to look back at some L3 code that allows 
platform-independent queries for the file structures, but which needs 
unrestricted shell escape.

David C. reminded me that texosquery is allowed in restricted shell 
escape mode, but it needs Java and is non-ideal. I was therefore 
wondering about putting together a Lua-based script that would do the 
same things, and thus would be easier to rely on. But that's only 
worthwhile if it can be used without needing unrestricted shell escape.

I think if done right, the restriction on `"` in restricted mode is OK - 
as the tool would be written knowing this, it can be managed.

But before doing anything, I wonder if the whole idea is a non-starter: 
thoughts?

Joseph


More information about the tex-live mailing list.