[tex-live] running tex and lua under restricted shell escape

Akira Kakuto kakuto at fuk.kindai.ac.jp
Sun Feb 14 03:31:17 CET 2016


Dear David,

> It works for os.execute(), but here it does not work for os.spawn().
> Similar safer codes are written also for os.spawn().
> I'll study later today, if I'm wrong or ...

I was wrong.

Both of
--
-- t.lua
os.spawn('rm abc.tex')

and

--
-- t.lua
os.execute('rm abc.tex')

remove abc.tex by "texlua t.lua" with shell_escape = p.

Both of
%
% t.tex
\directlua{os.spawn('rm abc.tex')}
\bye

and

%
% t.tex
\directlua{os.execute('rm abc.tex')}
\bye

do not remove abc.tex by "luatex t.tex" with whell_escape = p,
but remove abc.tex by "luatex --shell-escape t.tex".

Best,
Akira



More information about the tex-live mailing list