For security reasons, don't use the current directory but the home
commit07f95f1674217275ed4612f1dcaa95a88435c6a7
authorWerner LEMBERG <wl@gnu.org>
Mon, 13 Nov 2000 16:51:32 +0000 (13 16:51 +0000)
committerWerner LEMBERG <wl@gnu.org>
Mon, 13 Nov 2000 16:51:32 +0000 (13 16:51 +0000)
tree250ed3c7acd72939953029a037f74b11c5ec291c
parent27ab6f3035b996e0c81cdb35dc2dcca1be8055db
For security reasons, don't use the current directory but the home
directory while searching and scanning troffrc and troffrc-end.
Similarly, replace the current directory with the home directory
in the font path.

* Makefile.in (fontpath, tmacpath): Remove current directory.

* src/libs/libgroff/searchpath.cc (search_path::search_path): Add
two parameters `add_home' and `add_current'.
(search_path::~search_path, search_path::command_line_dir,
search_path::open_file): Remove tests for `dirs' being zero.
* src/include/searchpath.h: Adjust.
* src/libs/libgroff/macropath.cc, src/include/macropath.h: Add
`safer_macro_path'.
* src/libs/libgroff/fontfile.cc: Adjust `font_path'.

* src/roff/troff/troff.h: Add `searchpath.h' and `mac_path'.
* src/roff/troff/input.cc: Use `mac_path', initialized with
`macro_path'.
(process_startup_file): Set `mac_path' to `safer_macro_path'.
* src/roff/troff/env.cc: Use `mac_path'.

* src/preproc/eqn/main.cc (main): Use `safer_macro_path'.

* NEWS, man/roff.man, src/roff/troff/troff.man,
src/rof/groff/groff.man, tmac/groff_tmac.man, arch/djgpp/README:
Updated.

* src/include/lib.h: Don't include groff-getopt.h for OSF/1.

* aclocal.m4 (GROFF_SYS_ERRLIST): Do test in C, not in C++.
* configure.in: Fix typo in comment.
* configure: Regenerated.

* src/libgroff/*, src/include/*, src/roff/troff/*: Fixing copyright
dates.
40 files changed:
ChangeLog
Makefile.in
NEWS
aclocal.m4
arch/djgpp/README
configure
configure.in
man/roff.man
src/include/driver.h
src/include/lib.h
src/include/macropath.h
src/include/searchpath.h
src/libs/libgroff/errarg.cc
src/libs/libgroff/font.cc
src/libs/libgroff/fontfile.cc
src/libs/libgroff/getcwd.c [copied from src/include/driver.h with 53% similarity]
src/libs/libgroff/htmlindicate.cc
src/libs/libgroff/iftoa.c
src/libs/libgroff/illegal.cc
src/libs/libgroff/itoa.c
src/libs/libgroff/macropath.cc
src/libs/libgroff/nametoindex.cc
src/libs/libgroff/searchpath.cc
src/libs/libgroff/strtol.c
src/libs/libgroff/tmpfile.cc
src/preproc/eqn/main.cc
src/roff/groff/groff.man
src/roff/troff/column.cc
src/roff/troff/div.cc
src/roff/troff/env.cc
src/roff/troff/env.h
src/roff/troff/input.cc
src/roff/troff/node.cc
src/roff/troff/node.h
src/roff/troff/reg.cc
src/roff/troff/reg.h
src/roff/troff/request.h
src/roff/troff/troff.h
src/roff/troff/troff.man
tmac/groff_tmac.man