diff options
author | Karl Berry <karl@freefriends.org> | 2009-02-26 19:44:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-02-26 19:44:17 +0000 |
commit | fd209ee79002d0d87c3835c8e2697ed0eb7cc53c (patch) | |
tree | 4e2d10d678beb337d03b525d939068b6ebb55b24 /Build/source/texk/kpathsea | |
parent | 6226ce8e1a87017d3c958d63660c83b669e4da9a (diff) |
new restricted mode for \write18
git-svn-id: svn://tug.org/texlive/trunk@12244 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/texmf.cnf | 32 |
2 files changed, 28 insertions, 9 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 3f7e279e86c..606842e1f9e 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +2009-02-26 Karl Berry <karl@tug.org> + + * texmf.cnf (shell_escape): set to new possibility p. + (shell_escape_commands): first cut at allow list. + 2009-02-21 Karl Berry <karl@tug.org> * tex-file.c: doc fixes. diff --git a/Build/source/texk/kpathsea/texmf.cnf b/Build/source/texk/kpathsea/texmf.cnf index 709aba5f2c4..133d2bb29c9 100644 --- a/Build/source/texk/kpathsea/texmf.cnf +++ b/Build/source/texk/kpathsea/texmf.cnf @@ -13,6 +13,7 @@ % Any identifier (sticking to A-Za-z_ for names is safest) can be assigned. % The `=' (and surrounding spaces) is optional. % $foo (or ${foo}) in a value expands to the envvar or cnf value of foo. +% Long lines can be continued with a \. % % Earlier entries (in the same or another file) override later ones, and % an environment variable foo overrides any texmf.cnf definition of foo. @@ -26,18 +27,18 @@ % right-hand side. For environment variables, use FOO_PROGRAM. % % Which file formats use which paths for searches is described in the -% various programs' and the kpathsea documentation. +% various programs' and the Kpathsea documentation. % % // means to search subdirectories (recursively). % A leading !! means to look only in the ls-R db, never on the disk. % In this file, either ; or : can be used to separate path components. % A leading/trailing/doubled path separator in the paths will be % expanded into the compile-time default. Probably not what you want. -% -% You can use brace notation, for example: /usr/local/{mytex,othertex} -% expands to /usr/local/mytex:/usr/local/othertex. Instead of the comma -% you can use the path separator: /usr/local/{mytex:othertex} also expands -% to /usr/local/mytex:/usr/local/othertex. +% +% Brace notation is supported, for example: /usr/local/{mytex,othertex} +% expands to /usr/local/mytex:/usr/local/othertex. You can use the path +% separator as well as the comma for this: /usr/local/{mytex:othertex} +% also expands to /usr/local/mytex:/usr/local/othertex. % Part 1: Search paths and directories. @@ -484,9 +485,22 @@ engine = unsetengine % babel.sty, not babel.sty.tex, regardless of this setting. try_std_extension_first = t -% Enable system commands via \write18{...}? Obviously insecure, despite -% being so useful. -shell_escape = f +% Enable system commands via \write18{...}. When enabled fully (set to +% 1), obviously insecure. When enabled partially (set to p), only the +% commands listed in shell_escape_commands are allowed. Although this +% is not fully secure either, it is much better, and so useful that we +% enable it for everything but bare tex. +shell_escape = p + +% No spaces in this command list. +shell_escape_commands = \ +bibtex,dvips,epstopdf,epspdf,etex,gnuplot,kpsewhich,\ +latex,luatex,lualatex,makeindex,mpost,\ +pdfcrop,pdflatex,pdfluatex,ps2pdf,pygmentize,\ +tex,texexec,texmfstart\ + +% plain TeX should remain unenhanced. +shell_escape.tex = f % Allow TeX \openin, \openout, or \input on filenames starting with `.' % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)? |