summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-10-26 23:34:39 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-10-26 23:34:39 +0000
commitbec831a18b4325adf2196602319e9dcec247642c (patch)
tree191393afd27d256f501d124ab774c88bb4dad18e /usr.bin/mandoc/roff.c
parent8d0f4f576ff831763265456b29f971bb3e303d45 (diff)
Warn developers that .so is fragile and suggest using ln(1) instead;
throwing a warning here was suggested by Joerg Sonnenberger.
Diffstat (limited to 'usr.bin/mandoc/roff.c')
-rw-r--r--usr.bin/mandoc/roff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index 8c8a84dc925..aadc1a6d2ad 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.14 2010/10/26 22:28:57 schwarze Exp $ */
+/* $Id: roff.c,v 1.15 2010/10/26 23:34:38 schwarze Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -1017,6 +1017,8 @@ roff_so(ROFF_ARGS)
{
char *name;
+ (*r->msg)(MANDOCERR_SO, r->data, ln, ppos, NULL);
+
name = *bufp + pos;
if ('/' == *name || strstr(name, "../") || strstr(name, "/..")) {
(*r->msg)(MANDOCERR_SOPATH, r->data, ln, pos, NULL);