-# $OpenBSD: Makefile,v 1.101 2016/03/30 06:38:46 jmc Exp $
+# $OpenBSD: Makefile,v 1.102 2016/07/10 10:03:15 schwarze Exp $
.include <bsd.own.mk>
${INSTALL} ${INSTALL_COPY} -S ${INSTALL_STRIP} \
-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
man.cgi ${DESTDIR}/var/www/cgi-bin/man.cgi
- ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/var/www/man/mandoc/man1
- ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/var/www/man/mandoc/man8
- ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- ${.CURDIR}/apropos.1 ${DESTDIR}/var/www/man/mandoc/man1/apropos.1
- ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- ${.CURDIR}/man.cgi.8 ${DESTDIR}/var/www/man/mandoc/man8/man.cgi.8
.include <bsd.prog.mk>
-/* $OpenBSD: cgi.c,v 1.72 2016/07/09 19:44:52 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.73 2016/07/10 10:03:15 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de>
{
size_t i;
- if ( ! strcmp(manpath, "mandoc"))
- return 1;
-
for (i = 0; i < req->psz; i++)
if ( ! strcmp(manpath, req->p[i]))
return 1;
resp_searchform(req, FOCUS_QUERY);
printf("<p>\n"
"This web interface is documented in the\n"
- "<a href=\"/%s%smandoc/man8/man.cgi.8\">man.cgi</a>\n"
+ "<a href=\"/%s%sman.cgi.8\">man.cgi(8)</a>\n"
"manual, and the\n"
- "<a href=\"/%s%smandoc/man1/apropos.1\">apropos</a>\n"
+ "<a href=\"/%s%sapropos.1\">apropos(1)</a>\n"
"manual explains the query syntax.\n"
"</p>\n",
scriptname, *scriptname == '\0' ? "" : "/",
free(manpath);
return;
}
-
- if (strcmp(manpath, "mandoc")) {
- free(req->q.manpath);
- req->q.manpath = manpath;
- } else
- free(manpath);
+ free(manpath);
if ( ! validate_filename(file)) {
pg_error_badrequest(
-.\" $OpenBSD: man.cgi.8,v 1.17 2016/07/07 14:32:24 schwarze Exp $
+.\" $OpenBSD: man.cgi.8,v 1.18 2016/07/10 10:03:15 schwarze Exp $
.\"
.\" Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 7 2016 $
+.Dd $Mdocdate: July 10 2016 $
.Dt MAN.CGI 8
.Os
.Sh NAME
.Pp
.Dl make man.cgi
.Pp
-and copy the files to the proper locations.
-Reading the
-.Cm installcgi
-target in the
-.Pa Makefile
-can help with that, but do not run it without carefully checking it
-because the directory layouts of web servers vary greatly.
+and copy the resulting binary to the proper location,
+for example using the command:
+.Pp
+.Dl make installcgi
+.Pp
+In addition to that, make sure the default manpath contains the files
+.Pa man1/apropos.1
+and
+.Pa man8/man.cgi.8 ,
+or the documentation links at the bottom of the index page will not work.
.Ss URI interface
.Nm
uniform resource identifiers are not needed for interactive use,
data directory containing all the manual trees.
Can be overridden by
.Dv MAN_DIR .
-.It Pa /man/mandoc/man1/apropos.1 , /man/mandoc/man8/man.cgi.8
-Manual pages documenting
-.Nm
-itself, linked from the index page.
.It Pa /man/manpath.conf
The list of available manpaths, one per line.
If any of the lines in this file contains a slash