[tex-live] Status of restricted \write18 and epstopdf conversion

Alexander Cherepanov cherepan at mccme.ru
Mon Oct 19 11:08:21 CEST 2009


Hi Akira!
On Mon, 19 Oct 2009 11:47:51 +0900, "Akira Kakuto" <kakuto at fuk.kindai.ac.jp> wrote:

>> The remaining items are only for the case of Windows.
>> 
>> 5. In tex, special symbols in \write18 are not handled properly, so
>> 
>>       repstopdf input.eps & echo Pwned
>>       repstopdf input.eps | echo Pwned
>> 
>> works fine;-) Seems \write18 should be switched off entirely on 
>> Windows (short of fixing tex binaries).

> Did you test those?

Sure. Just made a clear test on WinXP Home Edition SP3 Rus with 
texlive2009 net-installed yesterday (scheme-basic + epstopdf).

1. In an empty dir created write18-pipe.tex:

  \immediate\write18{repstopdf input.eps | echo Pwned 1}
  \immediate\write18{repstopdf input.eps & echo Pwned 2}
  \immediate\write18{repstopdf input.eps && echo Pwned 3}
  \csname @@end\endcsname\end

and go.bat:

  set PATH=C:\texlive\2009\bin\win32
  path
  latex write18-pipe.tex
  pause

2. Click go.bat from Explorer.

3. Results. write18-pipe.log:

  This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009) (format=latex 2009.10.18)  19 OCT 2009 12:42
  entering extended mode
   restricted \write18 enabled.
   %&-line parsing enabled.
  **write18-pipe.tex
  (./write18-pipe.tex
  LaTeX2e <2009/09/24>
  Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
  yphenation, loaded.
  runsystem(repstopdf input.eps | echo Pwned 1)...executed (allowed).

  runsystem(repstopdf input.eps & echo Pwned 2)...executed (allowed).

  runsystem(repstopdf input.eps && echo Pwned 3)...executed (allowed).

   ) 
  Here is how much of TeX's memory you used:
   5 strings out of 495062
   143 string characters out of 3182549
   45108 words of memory out of 3000000
   3282 multiletter control sequences out of 15000+200000
   3640 words of font info for 14 fonts, out of 3000000 for 9000
   28 hyphenation exceptions out of 8191
   5i,0n,1p,74b,8s stack positions out of 5000i,500n,10000p,200000b,50000s

  No pages of output.

On the screen:

  C:\test>set PATH=C:\texlive\2009\bin\win32

  C:\test>path
  PATH=C:\texlive\2009\bin\win32

  C:\test>latex write18-pipe.tex
  This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
   restricted \write18 enabled.
  entering extended mode
  (./write18-pipe.tex
  LaTeX2e <2009/09/24>
  Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
  yphenation, loaded.
  Pwned 1
  epstopdf ($Id: epstopdf.pl 15569 2009-09-30 00:21:49Z karl $) 2.11
  !!! Error: Cannot open "input.eps": No such file or directory
  epstopdf ($Id: epstopdf.pl 15569 2009-09-30 00:21:49Z karl $) 2.11
  !!! Error: Cannot open "input.eps": No such file or directory
  Pwned 2
  epstopdf ($Id: epstopdf.pl 15569 2009-09-30 00:21:49Z karl $) 2.11
  Usage: epstopdf [OPTION]... [EPSFILE]

  [Skip epstopdf usage.]

  !!! Error: Unknown option or too many input files
   )
  No pages of output.
  Transcript written on write18-pipe.log.

  C:\test>pause
  [Message in Russian.]

Don't know why the the third line doesn't work but the first two ones 
work. Setting

  set PATH=C:\texlive\2009\bin\win32;%PATH%

instead of

  set PATH=C:\texlive\2009\bin\win32

doesn't change anything.

Is some other info needed?

Alexander Cherepanov




More information about the tex-live mailing list