diff options
author | jim-p <jimp@pfsense.org> | 2010-05-19 08:43:10 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-05-19 08:43:10 -0400 |
commit | a2f538d3dce281e3b17202637161ead8937bb942 (patch) | |
tree | 425af59a2f96d8eff27f962ea717ed0cea315fa7 | |
parent | 1c7267a22f0d3f85814b5a49005e27a534dd3568 (diff) | |
download | pfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.tar.gz pfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.tar.bz2 pfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.zip |
Add a package with a patch that fixes packet capture on 1.2.3 nanobsd.
-rw-r--r-- | config/packetcapturefix/packetcapturefix.inc | 18 | ||||
-rw-r--r-- | config/packetcapturefix/packetcapturefix.patch | 23 | ||||
-rw-r--r-- | config/packetcapturefix/packetcapturefix.xml | 65 | ||||
-rwxr-xr-x | pkg_config.7.xml | 10 |
4 files changed, 116 insertions, 0 deletions
diff --git a/config/packetcapturefix/packetcapturefix.inc b/config/packetcapturefix/packetcapturefix.inc new file mode 100644 index 00000000..8636c25c --- /dev/null +++ b/config/packetcapturefix/packetcapturefix.inc @@ -0,0 +1,18 @@ +<?php + +function packetcapturefix_install() { + global $g, $config; + + // Test to make sure the patch is not already applied. + $out = `patch -fslC --reverse -p1 -b .before_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.patch |& grep -ci reject`; + if ($out == 0) { + // If the patch has not already been applied, test to see if it will apply cleanly. + $out = `patch -fsNlC -p1 -b .before_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.patch |& grep -ci reject`; + if ($out == 0) { + // The patch should apply cleanly, let 'er rip. + mwexec("patch -fsNl -p1 -b .before_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.patch "); + } + } +} + +?>
\ No newline at end of file diff --git a/config/packetcapturefix/packetcapturefix.patch b/config/packetcapturefix/packetcapturefix.patch new file mode 100644 index 00000000..659fdd10 --- /dev/null +++ b/config/packetcapturefix/packetcapturefix.patch @@ -0,0 +1,23 @@ +diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php +index 69fd677..91d61cd 100644 +--- a/usr/local/www/diag_packet_capture.php ++++ b/usr/local/www/diag_packet_capture.php +@@ -265,6 +265,9 @@ include("head.inc"); ?> + <textarea style="width:98%" name="code" rows="15" cols="66" wrap="off" readonly="readonly"> + <?php + system ("/usr/sbin/tcpdump $disabledns $detail -r $fp$fn");?> ++ ++ conf_mount_ro(); ++ + </textarea><?php + } + }?> +@@ -277,8 +280,6 @@ include("head.inc"); ?> + </td></tr></table> + <?php + +-conf_mount_ro(); +- + include("fend.inc"); + + ?> diff --git a/config/packetcapturefix/packetcapturefix.xml b/config/packetcapturefix/packetcapturefix.xml new file mode 100644 index 00000000..96386cf9 --- /dev/null +++ b/config/packetcapturefix/packetcapturefix.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd"> +<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?> +<packagegui> + <copyright> + <![CDATA[ +/* $Id$ */ +/* ========================================================================== */ +/* + packetcapturefix.xml + part of pfSense (http://www.pfSense.com) + Copyright (C) 2007 to whom it may belong + All rights reserved. + + Based on m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>. + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + </copyright> + <description>Patch to fix packet capture on 1.2.3 Embedded (NanoBSD)</description> + <requirements>pfSense 1.2.3</requirements> + <faq>None</faq> + <name>Packet Capture NanoBSD Fix</name> + <version>0.2</version> + <title>Packet Capture NanoBSD Fix</title> + <include_file>/usr/local/pkg/packetcapturefix.inc</include_file> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> + <chmod>077</chmod> + <item>http://www.pfsense.com/packages/config/packetcapturefix/packetcapturefix.inc</item> + </additional_files_needed> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> + <chmod>077</chmod> + <item>http://www.pfsense.com/packages/config/packetcapturefix/packetcapturefix.patch</item> + </additional_files_needed> + <custom_php_install_command> + packetcapturefix_install(); + </custom_php_install_command> +</packagegui> diff --git a/pkg_config.7.xml b/pkg_config.7.xml index 0fb9c6eb..a7564cb7 100755 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -996,5 +996,15 @@ <required_version>1.2.3</required_version> <maximum_version>1.2.3</maximum_version> </package> + <package> + <name>Packet Capture Fix</name> + <descr>Patch to fix packet capture on 1.2.3 embedded (NanoBSD)</descr> + <category>System</category> + <config_file>http://www.pfsense.com/packages/config/packetcapturefix/packetcapturefix.xml</config_file> + <version>0.1</version> + <status>BETA</status> + <required_version>1.2.3</required_version> + <maximum_version>1.2.3</maximum_version> + </package> </packages> </pfsensepkgs> |