summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-07-26 22:04:14 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-07-26 22:04:14 +0000
commit8fe8669f74c5856803db534b3a09df3af1d7894c (patch)
treeb9e1e3b16bc71ee5a3fc66b166290641a7c7cf15
parent739a2369f3fde466582aad4efc412de60bd572d4 (diff)
Give groff the -S (safer mode) option. This is a paranoia mode that prevents
the execution of possibly dangerous macros like open, opena, write, pos, and sy which could be abused by a malicious man page; deraadt@ ok
-rw-r--r--gnu/usr.bin/groff/nroff/nroff.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/groff/nroff/nroff.sh b/gnu/usr.bin/groff/nroff/nroff.sh
index 7933025561e..080f04bde82 100644
--- a/gnu/usr.bin/groff/nroff/nroff.sh
+++ b/gnu/usr.bin/groff/nroff/nroff.sh
@@ -24,7 +24,7 @@ do
echo "$prog: option $1 requires an argument" >&2
exit 1
;;
- -i|-[mrno]*)
+ -i|-S|-[mrno]*)
opts="$opts $1";
;;
@@ -58,4 +58,4 @@ done
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
-exec groff -Wall -mtty-char $T $opts ${1+"$@"}
+exec groff -S -Wall -mtty-char $T $opts ${1+"$@"}