[tex-live] texosquery and shell escape

Enrico Gregorio enrico.gregorio at gmail.com
Tue Apr 18 22:28:43 CEST 2017


As far as I can see, texosquery-jre8 should be allowed in the restricted
shell escape.

However, the following plain TeX document only works if the call is

  pdftex -shell-escape test

Here's the test.tex file:

\input texosquery
\def\TeXOSInvokerName{texosquery-jre8}
\TeXOSQuery{\result}{-o -r}
\def\parseresult#1#2{OS Name: {\tt #1}. OS Version: {\tt #2}.}
\ifx\result\empty
 Query failed!
\else
 \expandafter\parseresult\result
\fi
\bye

The log when pdftex is called without -shell-escape

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded
format=pdftex 2017.4.18)  18 APR 2017 22:23
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**qrp
(./qrp.tex
(/usr/local/texlive/2017/texmf-dist/tex/latex/texosquery/texosquery.tex

TeXOSQuery: reading configuration file
(/usr/local/texlive/2017/texmf-dist/tex/latex/texosquery/texosquery.cfg)
\@texosquery at digitindex=\count27
)

TeXOSQuery: texosquery-jre8 -o -r
[1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
)</us
r/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on qrp.pdf (1 page, 12388 bytes).
PDF statistics:
 12 PDF objects out of 1000 (max. 8388607)
 7 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

The log when pdftex is called with -shell-escape

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded
format=pdftex 2017.4.18)  18 APR 2017 22:24
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
**qrp
(./qrp.tex
(/usr/local/texlive/2017/texmf-dist/tex/latex/texosquery/texosquery.tex

TeXOSQuery: reading configuration file
(/usr/local/texlive/2017/texmf-dist/tex/latex/texosquery/texosquery.cfg)
\@texosquery at digitindex=\count27
)
(|texosquery-jre8 -o -r)
[1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/
updmap/pdftex.map}]
)</usr/local/texlive/2017/texmf-dist/fonts/type1/public/ams
fonts/cm/cmr10.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmtt10.pfb>
Output written on qrp.pdf (1 page, 23256 bytes).
PDF statistics:
 16 PDF objects out of 1000 (max. 8388607)
 10 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

The relevant part in texmf.cnf (unmodified)

shell_escape_commands = \
bibtex,bibtex8,\
extractbb,\
gregorio,\
kpsewhich,\
makeindex,\
repstopdf,\
texosquery-jre8,\

For completeness, I tested a file using imakeidx and makeindex is run
in the restricted shell escape.

Ciao
Enrico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20170418/f67af3d8/attachment.html>


More information about the tex-live mailing list