summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-apache/mod_whatkilledus
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-apache/mod_whatkilledus')
-rw-r--r--www-apache/mod_whatkilledus/Manifest1
-rw-r--r--www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf5
-rw-r--r--www-apache/mod_whatkilledus/files/gen_test_char.c121
-rw-r--r--www-apache/mod_whatkilledus/metadata.xml5
-rw-r--r--www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild33
5 files changed, 165 insertions, 0 deletions
diff --git a/www-apache/mod_whatkilledus/Manifest b/www-apache/mod_whatkilledus/Manifest
new file mode 100644
index 000000000000..e1cf2652eead
--- /dev/null
+++ b/www-apache/mod_whatkilledus/Manifest
@@ -0,0 +1 @@
+DIST wku_bt-2.01.zip 933169 SHA256 3033a07b284a67e519e3b2d09a255b9cd8ce5902d3d9971d4cf182dec75c7d27 SHA512 c1bde8a26b395fc5fc66cd83c9282a8c519f34d27bef628ec502cec4245a7d446300178c9c94a5c5c0eb817bb8dd146587607760f9c9e780986d6ec53f03fb4c WHIRLPOOL dc2fa4debac883909f084562ffa0d9ab9e7f60a76bd02ee0054a0258444165f6fa63490bfefeaa03fe476ca9abc1ba93e2ad60858ba3ee4611b227b48e49bf1f
diff --git a/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf b/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf
new file mode 100644
index 000000000000..4d99d8af4523
--- /dev/null
+++ b/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf
@@ -0,0 +1,5 @@
+<IfDefine WHATKILLEDUS>
+ LoadModule whatkilledus_module modules/mod_whatkilledus.so
+ EnableExceptionHook On
+ WKULogfile /var/log/apache2/whatkilledus.log
+</IfDefine>
diff --git a/www-apache/mod_whatkilledus/files/gen_test_char.c b/www-apache/mod_whatkilledus/files/gen_test_char.c
new file mode 100644
index 000000000000..587583aed609
--- /dev/null
+++ b/www-apache/mod_whatkilledus/files/gen_test_char.c
@@ -0,0 +1,121 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "apr.h"
+#include "apr_lib.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if APR_HAVE_STRING_H
+#include <string.h>
+#endif
+
+/* A bunch of functions in util.c scan strings looking for certain characters.
+ * To make that more efficient we encode a lookup table.
+ */
+#define T_ESCAPE_SHELL_CMD (0x01)
+#define T_ESCAPE_PATH_SEGMENT (0x02)
+#define T_OS_ESCAPE_PATH (0x04)
+#define T_HTTP_TOKEN_STOP (0x08)
+#define T_ESCAPE_LOGITEM (0x10)
+#define T_ESCAPE_FORENSIC (0x20)
+
+int main(int argc, char *argv[])
+{
+ unsigned c;
+ unsigned char flags;
+
+ printf("/* this file is automatically generated by gen_test_char, "
+ "do not edit */\n"
+ "#define T_ESCAPE_SHELL_CMD (%u)\n"
+ "#define T_ESCAPE_PATH_SEGMENT (%u)\n"
+ "#define T_OS_ESCAPE_PATH (%u)\n"
+ "#define T_HTTP_TOKEN_STOP (%u)\n"
+ "#define T_ESCAPE_LOGITEM (%u)\n"
+ "#define T_ESCAPE_FORENSIC (%u)\n"
+ "\n"
+ "static const unsigned char test_char_table[256] = {",
+ T_ESCAPE_SHELL_CMD,
+ T_ESCAPE_PATH_SEGMENT,
+ T_OS_ESCAPE_PATH,
+ T_HTTP_TOKEN_STOP,
+ T_ESCAPE_LOGITEM,
+ T_ESCAPE_FORENSIC);
+
+ for (c = 0; c < 256; ++c) {
+ flags = 0;
+ if (c % 20 == 0)
+ printf("\n ");
+
+ /* escape_shell_cmd */
+#if defined(WIN32) || defined(OS2)
+ /* Win32/OS2 have many of the same vulnerable characters
+ * as Unix sh, plus the carriage return and percent char.
+ * The proper escaping of these characters varies from unix
+ * since Win32/OS2 use carets or doubled-double quotes,
+ * and neither lf nor cr can be escaped. We escape unix
+ * specific as well, to assure that cross-compiled unix
+ * applications behave similiarly when invoked on win32/os2.
+ *
+ * Rem please keep in-sync with apr's list in win32/filesys.c
+ */
+ if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) {
+ flags |= T_ESCAPE_SHELL_CMD;
+ }
+#else
+ if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) {
+ flags |= T_ESCAPE_SHELL_CMD;
+ }
+#endif
+
+ if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) {
+ flags |= T_ESCAPE_PATH_SEGMENT;
+ }
+
+ if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) {
+ flags |= T_OS_ESCAPE_PATH;
+ }
+
+ /* these are the "tspecials" from RFC2068 */
+ if (c && (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c))) {
+ flags |= T_HTTP_TOKEN_STOP;
+ }
+
+ /* For logging, escape all control characters,
+ * double quotes (because they delimit the request in the log file)
+ * backslashes (because we use backslash for escaping)
+ * and 8-bit chars with the high bit set
+ */
+ if (c && (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c))) {
+ flags |= T_ESCAPE_LOGITEM;
+ }
+
+ /* For forensic logging, escape all control characters, top bit set,
+ * :, | (used as delimiters) and % (used for escaping).
+ */
+ if (!apr_isprint(c) || c == ':' || c == '|' || c == '%'
+ || apr_iscntrl(c) || !c) {
+ flags |= T_ESCAPE_FORENSIC;
+ }
+
+ printf("%u%c", flags, (c < 255) ? ',' : ' ');
+ }
+
+ printf("\n};\n");
+
+ return 0;
+}
diff --git a/www-apache/mod_whatkilledus/metadata.xml b/www-apache/mod_whatkilledus/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_whatkilledus/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild b/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild
new file mode 100644
index 000000000000..10cb83d50ee6
--- /dev/null
+++ b/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module depend.apache
+
+DESCRIPTION="Debug segmentation faults in Apache threads"
+HOMEPAGE="http://emptyhammock.com/projects/httpd/diag/"
+SRC_URI="http://emptyhammock.com/downloads/wku_bt-${PV}.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=www-apache/mod_backtrace-2.01
+ =www-servers/apache-2*[debug]"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="BACKTRACE WHATKILLEDUS"
+
+need_apache2
+
+S="${WORKDIR}/wku_bt-${PV}"
+
+src_compile() {
+ APXS2_ARGS="-c ${PN}.c diag.c -ldl"
+ apache-module_src_compile
+}