tetex.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --- texk/dvipsk/dvips.c.orig Wed Jul 3 19:13:42 2002
  2. +++ texk/dvipsk/dvips.c Fri Jul 5 09:45:34 2002
  3. @@ -64,7 +64,7 @@
  4. Boolean cropmarks ; /* add cropmarks? */
  5. Boolean abspage = 0 ; /* are page numbers absolute? */
  6. Boolean tryepsf = 0 ; /* should we try to make it espf? */
  7. -Boolean secure = 0 ; /* make safe for suid */
  8. +Boolean secure = 1 ; /* make safe for suid */
  9. int collatedcopies = 1 ; /* how many collated copies? */
  10. int sectioncopies = 1 ; /* how many times to repeat each section? */
  11. integer pagecopies = 1 ; /* how many times to repeat each page? */
  12. --- texk/dvipsk/dvips.1.orig Sun Nov 1 04:45:06 1998
  13. +++ texk/dvipsk/dvips.1 Fri Jul 5 09:50:52 2002
  14. @@ -320,7 +320,9 @@
  15. Stack pages in reverse order. Normally, page 1 will be printed first.
  16. .TP
  17. .B -R
  18. -Run in secure mode. This means that ``backtick'' commands from a
  19. +Run in secure mode. This is the default; to run unsecurely use the
  20. +.B -R0
  21. +option. This means that ``backtick'' commands from a
  22. .I \\\special{}
  23. or
  24. .I \epsffile{}
  25. --- texk/kpathsea/tex-make.c.orig Tue Jan 26 21:31:23 1999
  26. +++ texk/kpathsea/tex-make.c Tue Sep 3 12:07:34 2002
  27. @@ -138,14 +138,6 @@
  28. int save_stderr = -1;
  29. #endif
  30. - /* If the user snuck `backquotes` or $(command) substitutions into the
  31. - name, foil them. */
  32. - for (i = 0; i < strlen (cmd); i++) {
  33. - if (cmd[i] == '`' || (cmd[i] == '$' && cmd[i+1] == '(')) {
  34. - cmd[i] = '#';
  35. - }
  36. - }
  37. -
  38. /* Tell the user we are running the script, so they have a clue as to
  39. what's going on if something messes up. But if they asked to
  40. discard output, they probably don't want to see this, either. */
  41. @@ -259,10 +251,31 @@
  42. string args, cmd;
  43. const_string prog = spec.program;
  44. const_string arg_spec = spec.program_args;
  45. + unsigned int i;
  46. if (format <= kpse_any_glyph_format)
  47. set_maketex_mag ();
  48. + /* If the user snuck `backquotes` or $(command) substitutions etc
  49. + into the name, foil them.
  50. + Thwart ../ in file names too.
  51. + */
  52. + for (i = 0; i < strlen (base); i++) {
  53. + char c = base[i];
  54. +
  55. + if (c == '.' && base[i+1] == '.' && base[i+2] == '/') {
  56. + base[i] = base[i+1] = '_';
  57. + continue;
  58. + }
  59. +
  60. + if (('A' <= c && c <= 'Z')
  61. + || ('a' <= c && c <= 'z')
  62. + || ('0' <= c && c <= '9')
  63. + || strchr("_-.", c))
  64. + continue;
  65. + base[i] = '#';
  66. + }
  67. +
  68. /* Here's an awful kludge: if the mode is `/', mktexpk recognizes
  69. it as a special case. `kpse_prog_init' sets it to this in the
  70. first place when no mode is otherwise specified; this is so